In a medium saucepan, stir together sugar, cocoa powder, cornstarch, and salt.
Whisk in the cold milk and mix until combined.
Cook over medium heat, bringing to a boil, stirring constantly.
Boil for 1 minute, continuing to stir.
Remove from heat & stir in the butter and vanilla.
Carefully transfer to a large bowl and cover with plastic wrap. Place the plastic directly on top of the pudding mixture so that it is touching it.
Refrigerate for at least 30 minutes before serving with a dollop of whipped cream and chocolate shavings on top.