Heat the milk with dry ingredients: In a medium saucepan, whisk the milk, sugar and cocoa powder together and heat over medium-low heat until warm.
Temper the egg yolks: In a small bowl, gently whisk 2 egg yolks. Add 2-3 tablespoons of the warmed milk and into the egg yolks and whisk, then pour thee yolks back into the pudding and whisk to combine.
Make a slurry with the corn starch: Add 2-3 tablespoons of the warmed milk and whisk into the cornstarch then pour back into the saucepan and whisk to combine.
Cook until thickened: Continue whisking the pudding until it starts to thicken and lightly bubble, approximately 10-15 minutes. The mixture will start to coat the outside of the pan as it thickens. Ensure its thickened before moving onto the next step.
Add the chocolate: Slowly add chocolate and continue whisking until it’s completely incorporated. Cook for 2-4 minutes, until bubbles start to break the surface, stirring constantly.
Add the vanilla: Remove the pudding from the heat and whisk in the vanilla extract.
Strain the pudding: Strain the pudding through a fine sieve into a bowl and then transfer to the prepared pie crust. Cover with clear plastic wrap (placing directly on the surface of the pudding), then poke a few holes in the plastic wrap with a toothpick.
Cool and refrigerate: Allow the pudding to cool on the counter for 30-60 minutes before refrigerating. Refrigerate 2-4 hours until the pudding has cooled and is firm.