Preheat the oven to 375 degrees.
Melt 1 Tbsp. butter. Sautee half the onions, half the tomatoes, and the garlic for 5 minutes. Turn off the heat.
Add the can of chili beans to the pan.
Press down on the beans with a potato masher or cylinder roller to smash the beans.
Add the can of refried beans to the pan, then stir everything together to combine.
Place into a greased, oven-proof dish. Top with cheese, the rest of the tomatoes and onions, and green onions.
Place in the oven for 8-10 minutes until cheese is melted.