I found a great article on how opioids work and opioid-induced constipation. Since all patients on opioid therapy for pain management experience some degree of constipation (based on opioids bind to receptors in the gastrointestinal tract), I thought this would be helpful.

Here's a link to the entire article, which has great figures: