Codeine operates in the central nervous system and the brain by blocking pain signals in the body. 

https://recoverypartnernetwork.com/drug/opioid/codeine-addiction