In a medium saucepan off of heat, whisk together the sugar, cocoa powder, corn starch, and salt. Then whisk in the egg yolks and the milk.
1 1/2 cups granulated sugar, 2 tablespoons cocoa powder, 1/4 cup cornstarch, 1/2 teaspoon salt, 3 large egg yolks, 3 cups whole milk
Place over medium heat and stir consistently until it is boiling and thickened, about 10 minutes. Once it starts to bubble, let it boil, while stirring, for 1 minute. At the end, it should be able to easily coat the back of a spoon.
Stir in the chocolate, butter, and vanilla until smooth.
4 ounces quality chocolate, 1 tablespoon unsalted butter, 1 1/2 teaspoons vanilla extract
Pour into the baked pie crust and put in the refrigerator to cool for 4 hours.
1 baked pie crust
Make the whipped cream before serving and top. Please note that the whipped cream can go on the pie up to 24 hours in advance. Top with chocolate shavings.
1 cup whipped cream