BOOM! So there are pictures out there of exploding jars of refried beans. I know some have figured out how to do it with only small failures. But the simplest fix is to not mush up the beans before canning.
you will need
1 cup dry pinto beans (soak over night then drain)
1 whole bay leaf
1/4 cup bacon fat
1 yellow onion, finely chopped
1 tablespoon minced garlic
1 tablespoon minced jalapeno, seeded
1 tablespoon chili powder
1/2 teaspoon salt
In a heavy kettle or pot, bring beans, the bay leaf and enough water to cover by 2 inches to a boil over medium high heat. Reduce heat and simmer, uncovered, for up to 2 hours. Stir occasionally, add water as needed. Removed from heat. Discard bay leaf. Place beans into your jars.
Heat up the bacon fat in a skillet, add onions and cook until soft. Stir in the remaining ingredients. Mix well and remove from heat. If the mixture seems too paste like, stir in some of your bean cooking water to thin out.
Using a tablespoon at a time, evenly distribute the onion mix into your beans jars. Pour cooking water over top to cover leaving 1 inch of head space.
Process in a pressure canner. 15 lbs pressure for 90 minutes.
When ready to eat, puree or mash the entire jar of beans. Pour into skillet and refry.
(tried to take a photo, but the lighting in my kitchen is awful, and the pics looked bad)