Pain medication Drugs.com says codeine is an opioid pain medication ... especially in a child or other person using the medicine without prescription,” it warns.