Opioid receptors (ORs) are widely distributed in the brain, the spinal cord, and the digestive tract and play an important role in nociception. All known ORs are G-protein-coupled receptors (GPCRs) of family A. Another well-known member of this family, rhodopsin, is activated by light through the cis/trans isomerization of a covalently bound chromophore, retinal. We now show how an OR can be combined with a synthetic azobenzene photoswitch to gain light sensitivity. Our work extends the reach of photopharmacology and outlines a general strategy for converting Family A GPCRs, which account for the majority of drug targets, into photoreceptors.