This approach is known as relapse prevention training. This is a Cognitive-Behavioral therapy approach to avoid relapses in alcoholic detoxification or drug detoxification processes. It
consists of teaching the person to identify and prevent situations of
risk of a possible relapse, for example, avoid visiting bars or
friendships that incite the consumption of drugs or alcohol.
I hope my answer can help you.