For the crust: Position a rack in the middle of the oven and preheat the oven to 325 degrees F.
Coat the inside of a 9-inch pie plate with nonstick cooking spray.
Melt the chocolate and butter in a small saucepan over medium heat, stirring continuously. Stir both of the sugars and the vanilla and salt into the chocolate mixture with a whisk. Remove from the heat and let cool for a few minutes. Stir in the egg and beat vigorously until fully incorporated. Add the flour and cocoa powder and stir just until combined; the batter should be sticky and fairly stiff.
Spoon the batter into the middle of the pie plate and cover the batter with a piece of plastic wrap big enough to cover the pie plate. Smooth the batter across the bottom of the pie plate and 1/2 inch up the sides using your fingers. Remove the plastic wrap and bake until the top is crispy and a toothpick inserted into the center comes out clean, about 15 minutes. (Check the batter after 10 minutes; if the sides are slumping or the bottom puffs up, use the rounded back of a large metal spoon to push the sides back up the pie plate and the bottom back down.) Set aside on a wire rack to cool, at least 15 minutes.
For the pudding: Whisk the sugar, cocoa powder, cornstarch and salt together in a medium saucepan. Vigorously whisk in the yolks, then the milk until smooth. Cook over medium heat, stirring constantly, until the mixture starts to thicken and simmer, about 4 minutes. Stir in the chopped chocolate and vanilla until melted, then remove from the heat. Pour into the pie shell and cover with plastic wrap pressed gently against the pudding's surface (only if you don't want a skin to form). Refrigerate until set, about 2 hours.
Shave some milk chocolate with a vegetable peeler or grater and scatter the pieces over the pie.
Copyright 2015 Television Food Network, G.P. All rights reserved.