HRT may be covered under your student insurance. The cost depends in the specifics of the policy, deductibles, etc.
Hrt medication needs to be prescribed to be dispensed by the pharmacy, however, San Francisco does have "informed consent" clinics which will provide you with the proper documentation.