Commitment devices are tools that attempt to bridge the gap between a person's initial motivation to perfrom the behavior and the typical pattern of noncompliance as time goes on.
One prominent example is the "Ulysses Pact," where Filipino banking customers were offered the option to enroll in an account where their ability to make withdrawals would be limited. In a study by Ashraf and Karlan (2005), participants with the commitment account saved 81% more than those with typical accounts.
There are many other examples of commitment devices. Temptation bundling is a form of commitment device where people only engage in an enjoyable activity when it's simultaneous with an activity they intend to do more (for example, only listening to a certain podcast or audiobook while walking on a treadmill).
Pre-paying for a service is a basic form of commitment device, and one used by Dan Ariely when he intended to increase his fruit and vegetable consumption. He paid for a year of biweekly deliveries from a local CSA program up-front.