Loperamide is frequently used to slow gastrointestinal motility. It is available over the counter (in the US, I don't know about elsewhere) without any regulations whatsoever, yet it's derived from an opiate. Knowing that the opiates slow the intestinal motility, it makes sense that it shares the same side effect.
What doesn't make sense to me is why it doesn't share the same primary effect of analgesia? Clearly it binds to opiate receptors in the gut, but are they the same subtype as those in the CNS? Or is it that the structure of the drug is such that hardly any crosses the blood brain barrier?