Preheat your oven to 350°F (175°C).
Place the pie crust in your pan.
Poke small holes with a fork.
This stops bubbles from forming.
Brush with melted butter.
Bake for 12-15 minutes until golden.
Let it cool completely before adding filling.
Mix sugar, flour, and salt in a saucepan.
Add milk slowly while whisking constantly.
Cook on medium heat.
Stir until the mixture gets thick.
This takes about 10 minutes.
Remove from heat.
Take a small amount of hot mixture.
Pour it into the beaten egg yolks.
Stir quickly. This prevents eggs from cooking too fast.
Pour the egg mixture back into the saucepan.
Cook for 2 more minutes while stirring.
Remove from heat.
Add butter, shredded coconut, and vanilla.
Stir until butter melts completely.
Pour the warm filling into your cooled crust.
Spread it evenly with a spatula.
Cover with plastic wrap.
Press the wrap directly onto the filling.
This stops a skin from forming.
Put in the refrigerator.
Let it chill for at least 4 hours.
Beat heavy cream with an electric mixer.
Add sugar while beating.
Keep mixing until stiff peaks form.
Don't overmix or you'll make butter!
Spread the whipped cream over chilled pie.
Sprinkle toasted coconut on top for decoration.