Preheat your oven to 350°F (175°C). Place the unbaked pie crust in a 9-inch pie dish and crimp the edges to make it look nice.
In a large bowl, whisk together the eggs, sugar, and melted butter until smooth.
Add the milk, vanilla extract, and optional coconut extract, and whisk until everything is well mixed.
Stir in the shredded coconut. This will give your pie that yummy coconut flavor.
Pour the custard mixture into the prepared pie crust, spreading the coconut evenly.
Bake for 45–50 minutes, or until the center of the pie is set. You can check this by inserting a knife into the middle; if it comes out clean, it’s done!
If the edges of the crust get too brown, cover them with foil to prevent burning.
Let the pie cool to room temperature, then put it in the refrigerator for at least 2 hours before slicing.
Garnish with whipped cream and toasted coconut flakes if you like.