Melt butter in a pan and add onion. Cook until soft
Add remaining ingredients to pan EXCEPT shredded cheese. Stir to evenly mix and remove from heat. Check for seasoning and add salt and pepper to taste.
Transfer dip to a greased cast iron skillet or baking dish. Sprinkle shredded cheese on top.
Place in oven and bake for 20 minutes or until warm and cheese is melted.