If then there is a supreme practical principle or, in respect of the human will, a categorical imperative, it must be one which, being drawn from the conception of that which is necessarily an end for everyone because it is an end in itself, constitutes an objective principle of will, and can therefore serve as a universal practical law. The foundation of this principle is: rational nature exists as an end in itself . . the practical imperative will be as follows: So act as to treat humanity, whether in thine own person or in that of any other, in every case as an end withal, never as means only.
Fundamental Principles of the Metaphysics of Morals, 1785
Comment: To treat someone as an end is to love them, to bestow agape or caritas on them, all of which is of the essence of friendship. You know where Kant got this notion.