Place flour into a mixing bowl with the sugar.
Slowly add the butter cube by cube, and mix on low until it forms a wet-sand-like consistency. Add salt.
Press dough into the pie pan, and blind bake by lining with parchment paper and filling the crust with pie weighs, dry beans, or rice.
Bake at 350° for 20-25 min or until crust is slightly golden and cooked through. Allowed to cool completely before filling.
In a medium saucepan, heat the milk and cocoa powder on medium to high heat. Whisk until combined and mixture becomes hot + just begins to steam, about 2-4 minutes.
Whisk until fully combined,. Slowly pour ⅓ of the hot milk mixture into the egg mixture, Whisk to combine. Add another third of the milk, and whisk again to combine. Finally, add the remainder of the milk and whisk well.
Gently pour the mixture back into the saucepan and whisk on medium heat for 3-4 minutes or until mixture thickens. If it starts to bubble up too much, simply remove it from the heat and continue to whisk.
Immediately pour the mixture into a medium sized bowl and add the butter, vanilla, and chocolate chips. Whisk to fully combine. Place plastic wrap over the bowl, allowing it to touch the top of the pudding. This will keep it from forming a film.
Whisk the cold pudding until it is smooth, about 20 seconds. Pour the pudding into the pie crust and spoon it around until it is evenly filling the crust.
Top with the whipped cream and chocolate shavings, if desired.