In a saucepan off heat, whisk together the sugar, cocoa powder, cornstarch and salt.
½ cup sugar, ⅓ cup unsweetened cocoa powder, 3 tbsp cornstarch, pinch salt
Add in the milk and whisk to combine.
2½ cups whole milk
Place over medium heat and cook, whisking constantly, until thickened and the mixture just begins to bubble, about 10 minutes.
Immediately remove from the heat. Add in the butter and vanilla extract. Whisk until the butter has melted and the pudding is smooth.
2 tbsp unsalted butter, 1 tsp vanilla extract
Transfer to a bowl or individual serving dishes and place plastic wrap directly on the surface of the pudding to prevent a skin from forming. Chill for at least 2 hours.
Serve topped with freshly whipped cream and chocolate shavings.
whipped cream and chocolate shavings