Preheat oven to 400º. Lightly grease a 9 x 13 inch baking dish. Set aside.
In a skillet, brown ground beef and onion until beef is no longer pink. Drain off grease. Spread in the bottom of the baking dish. Spread the corn evenly over the beef. Spoon mashed potatoes over the corn and spread evenly all the way to the edge. Dot with the butter.
Bake for 30 minutes, or until the butter begins to brown on the top of the potatoes.