Prepare the crust by baking it according to the package instructions or your recipe, then let it cool completely.
- For the chocolate filling, combine the heavy cream, milk, and sugar in a saucepan. Heat over medium until it begins to simmer, then remove from heat.
- Whisk the egg yolks with cornstarch, salt, and a small amount of warm milk mixture. Slowly pour it into the milk mixture, whisking constantly. Return to medium heat, cooking for 5-7 minutes until thickened and bubbling.
- Remove from heat and stir in chopped chocolate, butter, and vanilla extract until smooth.
- Pour the chocolate filling into the cooled pie crust, smoothing the top. Let the pie cool at room temperature for 15 minutes, then refrigerate for at least 3 hours until fully set.
- Once chilled, garnish with whipped cream and chocolate shavings or cocoa powder if desired. Slice and serve!