The best recommended treatment for opioid use disorder is medical detox followed by an inpatient rehab program to support long-term recovery. Medications are often used to help reduce cravings and symptoms of withdrawal. For opioids, these include methadone, suboxone and naltrexone.