How can I convince my friend that contraception is forbidden not only within marriage but outside it? She says Humanae Vitae is against birth control only in marriage.

Humanae Vitae is explicit in its teaching against artificial birth control, and yes, the context is marriage. Humanae Vitae states:

"Hence, one who reflects well must also recognize that a reciprocal act of love that jeopardizes the responsibility to transmit life that God the Creator, according to particular laws, inserted therein, is in contradiction with the design constitutive of marriage, and the will of the Author or life. To use this divine gift destroying, even if only partially, its meaning and its purpose is to contradict the nature both of man and of woman and of their intimate relationship, and therefore it is to contradict also the plan of God" (HV 13).

These two sentences teach that anything that destroys the meaning of the "reciprocal act of love"—in this case contraception—is contrary to God. The Catechism calls these actions "intrinsically evil" (CCC 2370), meaning that it is evil in and of itself.

The Church also teaches that sex outside of marriage is contrary to the will of God and destroys the true purpose of the act (cf. CCC 2353).