This is called "aversion therapy."

Advertisement