5 large egg yolks
1/2 cup sugar
3 tablespoons cornstarch
2 tablespoons cocoa powder
1/4 teaspoon salt
2 cups milk
1 teaspoon vanilla
4 ounces finely chopped semisweet chocolate
2 tablespoons unsalted butter
Whisk egg yolks, sugar, cornstarch, cocoa and salt together in a medium bowl and set aside. Bring milk to a boil in a medium saucepan. Remove from heat and slowly whisk in a little egg mixture. Once bottom of bowl is warm, slowly whisk in remaining hot milk.
Pour mixture back into a clean medium saucepan, add the vanilla, and whisk over medium-low heat until it thickens, 3 to 4 minutes. Cook while constantly whisking until pudding is glossy and quite thick, 1 1/2 to 2 minutes longer. Transfer pudding to a clean bowl.
Add chopped chocolate and butter and gently whisk until chocolate is completely incorporated. Press a piece of plastic wrap onto surface of pudding to prevent a skin from forming. Refrigerate for at least 4 hours.