I've never understood the need for instant pudding mix.
3 tbsp cornstarch
4 tbsp sugar
1/4 tsp salt
2 cups milk
1 tsp vanilla
2 oz unsweeted chocolate (I've used bittersweet as well and it works)
Mix the cornstarch with the sugar and sal and 1/4 of the milk. Heat the remaining milk, then slowly add it to the cornstarch mixture. stirring constantly. Cook until thickened. stirring constantly, in a heavy bottomed pan. Add the chocolate. Continue to cook for about 15 minutes so that raw taste of the cornstarch disappears. Let cool then add the vanilla. Cover and chill.