Preheat the oven to 400 degrees. In a large oven-proof skillet, over medium-high heat, melt the butter. Add the onions. Season with salt and pepper. Saute until golden, about 4 minutes. Add the garlic and corned beef. Continue to saute for 2 minutes. Add the potatoes. Season with salt and pepper. Continue to cook for 4 minutes. Remove from the heat. Using the back of a large spoon or spatula, pack the mixture firmly into the pan. Place the pan in the oven. Cook for 8 to 10 minutes or until golden brown. Remove from the oven and slice into individual servings.