Only conscious beings have ends and therefore also means. However, teleological language can be applied metaphorically to pre-conscious evolution. For example, mobile marine organisms were naturally selected for increasing sensitivity to environmental alterations. Thus, sensitivity and survival were pre-conscious analogues of a means and an end. Sensitivity quantitatively increased until it was qualitatively transformed into sensation which was then selected because pleasure and pain have survival value.
Pleasure is metaphorically a biological means to survival and literally a psychological end in itself so it is the point at which the conscious seeking of ends in themselves replaces the unconscious selection of means to survival. However, pleasure is the start but not the end of teleology.
Humanity has survived by cooperating socially and communicating linguistically. Therefore, human consciousness comprises not only immediate sensations, including pleasures and pains, but also intellectual understanding, abstract knowledge, social identities, personal relationships, self-awareness and self-reflection.
value our fellow beings as end in themselves, not just as means to our ends;
value knowledge and understanding for their own sakes, not just for any practical applications that they might have;
practise immediate awareness in meditation.
To value conscious beings, pure knowledge and immediate awareness is to value consciousness as such and thus to regard it as an end transcending mere individual pleasure. So the teleological hierarchy is:
in pre-organic matter: energised complex molecules changing randomly until one becomes self-replicating;
in unconscious organisms: survival as an accidental byproduct of unconscious processes;
in sensitive organisms: pro-survival sensitivity increasing until it becomes sensation, including pleasure which is an end;
in sentient organisms: pleasure and survival as ends;
in self-conscious organisms: consciousness as an end.
In individual and collective self-determination, freedom transcends necessity, subjectivity transcends objectivity and mind transcends matter, at least temporarily. Longer term, can entropy be reversed and new universes created? Did the current universe originate thus? We do not know yet.