Well, my friend has found the answer. Simply put a large object, in this case a honeydew melon......on top of the freezer, right in the crack where the door meets the freezer and when you open the door to sneak a tasty treat you will get a melon on the head. You will not soon forget this handy diet aid.
The next time you try to sneak in the freezer, you, like Pavlov's dogs, will drool and then you will remember the conk on the head and you will leave the freezer door closed and go away and dust something or file something or watch the Olympics.
Success will be yours.
My friend is so clever. She should patent the idea.