In a 2-quart (small) saucepan, whisk together sugar, cornstarch, and salt. Slowly whisk in milk, whisking out any lumps as they form.
Heat over medium-low heat, whisking every other minute or so, until mixture is thick enough to coat the back of a spoon, 8 to 12 minutes. If the mixture begins to simmer before thickened, turn down the heat slightly.
Add chocolate and whisk until completely incorporated, 1 to 2 minutes. Whisk in vanilla.
Strain pudding through a fine mesh strainer to remove any lumps. Pour into individual serving cups or single container and allow to cool at room temperature for at least 15 minutes. Cover with plastic wrap--if you are worried about pudding skin, place wrap directly on pudding surface--and refrigerate for 2 to 3 hours, until set.
Top with whipped cream and chocolate shavings if desired and enjoy!
Approximate nutritional information is for 3 servings.