Several Meanings
The statement, “If you do not feel shame, do what you wish,” can be understood in several ways. The scholars give several explanations. It is interesting to consider that all of these meanings are true, and all of the meanings are possible simultaneously.
One way to understand it is as a threat. Do whatever you want, but be prepared to face the consequences. Those who do not have a sense of shame may as well do whatever they want, since that haya’ is an indispensable condition of good character and piety. It can also be understood as a statement of fact. People who lack haya’ will simply do as they please. They have no internal limitations or barriers to engaging in whatever they want. This problem can manifest on two levels: on an individual level where someone is openly indecent and sinful, and on a community level where society as a whole normalizes and embraces immorality.
The hadith can also be interpreted as a prescription from the Prophet. Believers can use their internal haya’ as a barometer to measure their actions. For actions that are not clearly forbidden, one way that we can check is by paying attention to our internal state. The Prophet (sas) said, “A sin is what becomes lodged in your chest, and what you hate for people to see you doing.” When a believer is faced with a choice, he or she can check for the feelings of haya’--shyness, shame, apprehensiveness, and worry. Would you feel ashamed if you were caught doing the action? If so, then refrain. If not, then do it hoping for Allah’s mercy.
It is important to remember here that the reference is Islam, not necessarily the norms of the general public. Society may try to promote something as acceptable or not, but our core values are shaped by the word of Allah and the example of His Prophet. The interpretations and standards of morality may differ based on the environment, but the underlying principle never changes.