Preheat the oven to 350°F.
Place the premade pie crust on a baking sheet.
Bake the pie crust on the center rack for 10 to 12 minutes, or until golden brown.
Remove the crust from the oven and allow it to cool completely.
In a large skillet, melt the unsalted butter over medium heat.
Add the sweetened shredded coconut flakes.
Cook for 3 to 5 minutes, stirring frequently, until the coconut is lightly toasted.
Remove the toasted coconut from the skillet and set it aside to cool.
In a large saucepan, combine the granulated sugar, all-purpose flour, salt, whole milk, and heavy whipping cream.
Place the saucepan over medium-high heat.
Cook while stirring frequently until the mixture begins to simmer and thicken.
Remove the saucepan from the heat.
Whisk in the vanilla extract.
In a separate bowl, crack the eggs and whisk until smooth.
Slowly add 1/4 c of the hot cream mixture to the eggs while whisking constantly.
Continue whisking quickly to temper the eggs and prevent curdling.
Pour the tempered egg mixture back into the saucepan.
Whisk until fully combined and smooth.
Stir in 3/4 of the toasted coconut, reserving the remaining coconut for garnish.
Pour the coconut filling into the baked pie crust.
Smooth the top evenly with a spatula.
Refrigerate the pie overnight, or until the filling is fully chilled and set.
Before serving, place the Cool Whip or whipped topping into a piping bag.
Decorate the top of the pie with dollops of whipped topping.
Sprinkle the reserved toasted coconut over the whipped topping.
Slice and serve chilled.