Bake the Crust: Preheat oven and bake pie crust according to package or recipe instructions until golden. Let cool.
Prepare the Filling: In a saucepan, combine coconut milk, sugar, and cornstarch, whisking until smooth. Cook over medium heat until thickened.
Temper the Eggs: Slowly add a small amount of the hot mixture to the eggs, whisking constantly. Return the egg mixture to the pan and cook 2–3 more minutes, stirring constantly until fully thickened.
Finish the Filling: Remove from heat and stir in butter, vanilla extract, and shredded coconut.
Assemble the Pie: Pour the coconut filling into the baked crust and chill for at least 4 hours, or until set.
Top and Serve: Spread whipped cream over the set filling and sprinkle with toasted coconut if desired. Serve chilled.
