Immanuel Kant said this quote

Every man is to be respected as an absolute end in himself: and it is a crime against the dignity that belongs to him as a human being to use him as a mere means for some external purpose.