I see plenty of advice out there on how to make canned pinto beans taste delicious, but does anyone know how to recreate that cheapo refrito taste? I've tried countless combinations of freshly cooked pinto beans, salt, garlic, chili powder, onions...  They always seem to be missing some crucial element, and I don't mean the sitting-in-a-can-forever-flavor! 
My first guess would be: more salt than you think.  This is probably the main "secret" for most processed foods.  Ortega Traditional Refried Beans have 560 mg of sodium per serving (that's a serving of 131 g, making 3.5 servings in a standard can).  A 1/4 tsp of table salt has 590 mg.  If you're making the equivalent of 1 can of beans, you would have to put in a little over 3/4 tsp of salt.    If you're making a biggish pot,  starting with 1 kg of dry beans (makes about 2 kg cooked), that would be about 4 tsp (9.5 g) of salt.  Yeah, it's a lot.  You can think about whether you really want to do that.  Other suggestions I have heard: sugar and cinnamon.  Haven't tried it myself, though. 