scare (someone) straight
To shock or frighten someone so severely that their bad behavior or actions become corrected or markedly improved. (That which frightens the person is often some example or manifestation of the possible consequences of those actions or behavior.) We felt like we just couldn't control our teenager's behavior any longer, so we sent him to a prison boot camp to scare him straight. I had a really bad drug addiction in college, but seeing my friend die from an overdose really scared me straight.