Preheat the oven to 375°F (190°C).
In a 9-inch oven-safe skillet, melt the butter over medium heat. Add the sugar and stir until it dissolves and turns golden brown.
Add the apples to the skillet, arranging them in a circular pattern. Cook for 10-15 minutes, until the apples are tender and caramelized.
Remove the skillet from the heat and let it cool for a few minutes.
Roll out the puff pastry on a floured surface to fit the size of the skillet. Place the pastry over the apples, tucking the edges down around the apples.
Brush the beaten egg over the pastry.
Bake for 25-30 minutes, until the pastry is golden brown and puffed.
Remove the skillet from the oven and let it cool for 5 minutes.
Place a large plate over the skillet and carefully flip the skillet over to release the pie onto the plate.
Serve warm with whipped cream or vanilla ice cream, if desired.