The best strategy to break a bad habit such as smoking, eating too much, drinking excessively, gambling, shopping excessively, and so forth is to not develop the habit in the first place! I know...easier said than done but prevention is really the very best way to avoid the formation of bad habits. As problematic habits unfold nipping them in the bud in the spirit of prevention is so very important if you can do it.
However, for so many people the train has already left the station and the bad habit is now fully formed and causing all sorts of troubles and distress. So now what? What do you do once these habits have solidified? Most people rely on willpower and motivation. This is a big mistake in my view since willpower and motivation vacillate and are totally unreliable day to day and over time. We really need to let go of the use of willpower and motivation to deal with long standing bad habits. It just doesn't work for the long term. Rather, we should use social engineering which is a much better strategy for sure. Basically, can you create an environment for yourself that forces you to change behavior for the better? Can you socially engineer your bad habits out of existence?