For filling, chop onions and add to a pan with garlic, butter and beans. Cook for five minutes until veggies start to soften. Add a pinch of salt and pepper and process until smooth. If you don’t have a food processor you can just mash the ingredients together. Stir in grated cheese.
To make the pupusa dough, stir water into masa until a dough forms. Knead for a minute or two. If the dough is dry and cracking, add more water. If it’s sticky, add more masa.
Take a small ball of dough slightly larger than a golf ball and roll it out to a six inch round. I like to use wax paper to help release the dough. Add about 1-2 tablespoons of filling to the center. Fold pupusa dough up around filling to enclose it in dough. Gently form a ball with the dough again, being careful to keep the filling enclosed.
Carefully flatten the pupusa out a second time. Wax paper helps. Try to get it about 6 inches across. If the pupusa cracks a lot, that means your dough is too dry.
Cook pupusas in a skillet with a small drizzle of oil or for 3 minutes per side on medium high heat.