Whisk together the sugar, cornstarch, and salt in a saucepan.
In a separate bowl, whisk together the can of coconut milk and the egg yolks.
Slowly whisk the milk mixture into the sugar mixture in the saucepan.
Cook medium heat, stirring constantly until the mixture comes to a boil. Boil for one minute, stirring constantly.
Remove from heat. Add the sweetened shredded coconut, butter, vanilla extract, and coconut extract. Stir until combined. Cool in a bowl of ice water or in the refrigerator.
Spread in a 9-inch pie shell. Chill in the refrigerator for 4 hours or until firm.
Top with whipped cream and toasted coconut.
Video
Notes
Leftovers and Storage
Refrigerator: Loosely wrap the leftovers and store them in the fridge for up to 4 days.Freezer: While you can freeze coconut pie, we do not recommend it as the ingredients tend to separate, and the filling can become watery.