The disclosure provides extended release pharmaceutical formulations comprising an opioid,particularly buprenorphine, a biocompatible organic solvent, and, optionally, a glycol, for use in the treatment of pain or opioid dependence. The pharmaceutical formulations are in the form of a pharmaceutical solution.