text: How erectile dysfunction is treated depends on what things are causing it. After your doctor checks you for medical problems and medicines that might cause erectile dysfunction, he or she may have you try a medicine to help with erectile dysfunction. Some of these medicines are injected into your penis. Other medicines are taken by mouth. Not everyone can use these medicines. Your doctor will help you decide if you can try them.