While doing my literature review for a recent project on Multiparty Privacy Conflicts, I bumped on a startup that designed a bracelet that gives little electric shocks every time the user performs a self-defined bad habit (e.g., eating at a fast foot).
I guess, this type of approach might have some positive outcomes for the kind of habits that are automatic (e.g., touching your nose) but I am not sure that it might work to setup behaviors that involve more high-cognitive functions (e.g., learning a new language).