Pain perception is heavily shaped by cognitive process and pharmacological drugs. In this talk, I will present data obtained in mice supporting the view that the neural circuit mechanisms that underlie placebo antinociception and morphine antinociception converge on the midbrain periaqueductal gray. Our results point to a role for descending cortical projections in placebo, but not morphine antinociception. I will also discuss our work developing a photopharmacological toolkit for bidirectional regulation of endogenous opioid receptors in vivo using light, and how we are using these tools to uncover the role of endogenous opioid peptide signaling in placebo antinociception. Collectively, this work illuminates neural pathways that contribute to cognitive and pharmacological pain modulation and paves the way for spatiotemporally precise behavioral photopharmacology experiments in model organisms.