Combine the sugar, cornstarch, and salt in a medium saucepan. Stir or whisk together.
Pour in milk and egg yolks, and whisk together.
Stir over medium heat until the mixture just barely comes to a boil, about 6-8 minutes (maybe less, maybe more; just watch it!) The second it starts to bubble and thicken remove it from the heat. Add the chocolate, vanilla, and butter, and stir until everything is beautifully combined.
Pour the pudding into the pie crust (if there is extra, spoon it into small dishes) and place in the fridge to chill for 4 hours uncovered.