Opioids have recently received much attention because of the epidemic in their use in some countries such as the USA and the UK. Concerns have been raised about the possibility that they can increase mortality in patients when used on a long-term basis. Moreover, they are known to induce paradoxical hyperalgesia as well as alterations of gut function. The analgesic properties of opioids are mediated by receptors located in the brain, but as opioid receptors are also expressed in the gastrointestinal tract, new drugs acting on these receptors have recently been developed to treat two functional disorders, namely irritable bowel syndrome with diarrhoea and opioid-induced constipation. The aim of this article is to highlight some interesting observations resulting from the development of these drugs in the field of functional gastrointestinal disorders.