Okay I haven't actually tried this (yet) but was given the recipe from a very lovely Mormon lady who does major food storage. This recipe should keep 3 years if kept out of direct sunlight and 2 years if in light.
Preheat the oven to 200°F. Sterilize your jars and have them hot. Melt your butter and pour it into the hot jars. Wipe the lid and rim with vinegar to clean (removes oils to promote a good seal). Twist on the bands a little tighter than normal, but not tight. Put the jars onto a tray and slide them into the preheated oven for 2 hours. Turn off the heat and leave them in overnight.
Mix well before use, refrigerate after opening. This will be a little bit grainy, but still good.