If using an unbaked pie shell, bake according to package directions using raw beans or pie weights in the bottom during baking.
Toast the shredded coconut on a sheet pan in the oven for about 5 minutes, stirring often until the majority has turned golden brown. Reserve 1/2 cup of baked coconut for topping.
To a saucepan oven low heat, combine the half-and-half, eggs, sugar, flour, and salt with a whisk and bring to a boil while whisking constantly. Allow the mixture to continue cooking and thicken for about 20 minutes. Thickness will resemble that of cake batter.
Remove from heat and add the 1 cup of toasted coconut along with the vanilla extract.
Pour the coconut custard mixture into the pie shell and chill for 4 hours or until firm.
Before serving, top with a thick layer of whipped topping and reserved coconut.