Prepare the frozen pie crust according to package instructions. You’re simply baking it to prepare it for the filling. Allow to cool completely.
In a medium sized saucepan, mix sugar, cocoa, flour, salt, and egg until well blended. Stir in milk slowly until ingredients are blended. Over medium heat and stirring constantly, bring to boil (takes about 15 minutes) and then immediately remove from heat. Stir in butter and vanilla. (makes 3 cups)
Pour into baked pie shell. If desired, cover with plastic wrap directly on surface of pudding to prevent a skin from forming.
Refrigerate 4 hours, or up to 24 hours.
Top with whipped cream, and chocolate shavings, if desired, and serve.