Form the ground beef into a patty and season with salt and pepper.
Heat a skillet over medium heat and add the butter.
Grill the patty until cooked to your liking, about 3-4 minutes per side.
Remove the patty and place a slice of cheese on top.
In the same skillet, add the buttered rye bread slices, and warm them slightly.
Place the patty with melted cheese on one slice of bread.
Spoon caramelized onions over the patty, then top with the second slice of bread.
Grill the sandwich until the bread is golden brown on both sides and the cheese is fully melted.