To make chocolate pastry: In a food processor or a bowl, combine flour, sugar, cocoa, and salt; whirl or mix to blend.
Add butter, whirl, or rub in with our fingers until fine crumbs form.
Add egg yolk and vanilla; whirl or mix with a fork until blended.
Lightly spray 9-inch pie pan with non-stick spray. Pour mixture into pan and press evenly over bottom, up sides and across rim. Pinch in decorative edge, or press with tines of fork.
Bake in 350°F oven just until crust is slightly darker around edges, 15 to 18 minutes.
Let cool on a rack at least 1 hour.
To make filling: In a 2-quart pan, combine ¾ cup sugar, cornstarch, and salt.
Add milk and whisk to blend.
Whisk over medium heat until mixture boils and thickens.
Do not scorch.
Remove from heat.
In a small bowl, beat egg yolks to blend.
Stir about ½ cup of the hot milk mixture into yolks, then add this mixture back it pan.
Return pan to medium-low heat and stir until mixture just begins to bubble, about 2 minutes.
Remove from heat and stir in butter and 1 teaspoon vanilla.
Spread a thin layer of warm custard over bottom.
Peel bananas and slice half into pie, covering bottom evenly.
Pour half the warm custard evenly over bananas.
Repeat to layer remaining bananas and custard.
Cover surface of custard with plastic wrap.
Chill until cold, at least 2 hours.
In a bowl, with a mixer on high speed, beat whipping cream and remaining sugar and vanilla until mixture holds soft peaks.
Mound on pie and swirl to cover.
Top with chocolate shavings, if desired.