Question: How does pain inform attitudes deemed unacceptable?
Sentence: In various contexts, the deliberate infliction of pain in the form of corporal punishment is used as retribution for an offence, or for the purpose of disciplining or reforming a wrongdoer, or to deter attitudes or behaviour deemed unacceptable.
Answer in sentence: yes