Every habit you have – good and bad – has the same pattern: Trigger (that initiates the behaviour), Routine (the behaviour itself; the action you take), Reward (the benefit you gain from doing the behaviour).
Source: The 3 R’s of Habit Change: How To Start New Habits That Actually Stick @ JamesClear.com
Photo: Shopping by Roderick Eime under Creative Commons license