Viagra is a prescription medication, so it can only be purchased with a valid prescription from a licensed healthcare provider. You can obtain a prescription for Viagra by consulting with a doctor or other healthcare professional.