How to Stop Bad Habits? (Shopaholic Version)

Apparently, stress and boredom cause you to indulge in your bad habits. I found it to be true as I always shop whenever I am stressed out. 

It is a hell of habit as shopping kind of soothes me and makes me feel like I am doing something beneficial. In a way, I actually avoid thinking about that stressful moment.

But I end up wasting so much money and I don't even use most of the stuff that I bought. 

How to stop bad habits?