Preheat your oven to 375°F (190°C).
Bake the pie crust according to package instructions and let it cool completely.
Layer the sliced bananas evenly in the bottom of the cooled pie crust.
In a medium saucepan, whisk together the sugar, cornstarch, and salt.
In a separate bowl, whisk together the milk and egg yolks.
Gradually pour the milk mixture into the saucepan with the sugar mixture, whisking constantly to prevent lumps from forming.
Cook the custard over medium heat, stirring constantly, until it thickens and comes to a boil.
Remove the custard from the heat and stir in the vanilla extract.
Pour the custard over the sliced bananas in the pie crust.
Allow the pie to cool to room temperature before covering it with plastic wrap and chilling in the refrigerator for at least 2-3 hours.
Before serving, top the pie with whipped cream and sliced bananas if desired.