Line the unbaked pie shell with foil or parchment paper and add pie weights or dried beans to about two-thirds full.
Place the pie shell in the oven and bake it for 15 minutes. Remove the pie weights and the foil or parchment paper.
Return the pie shell to the oven for about 5 minutes, or just until it begins to show a little color. Remove the pie shell to a rack and set aside.
Reduce the oven temperature to 350 F.
Place a heatproof bowl over a pan of simmering water. Add the butter and chocolate; stir until melted and smooth. Remove the bowl from the pan.
To the melted chocolate and butter mixture, add the sugar, flour, salt, milk, eggs, and vanilla. Beat for about 5 minutes with an electric mixer. Stop and scrape the sides and bottom of the bowl with a spatula a few times.
Pour the filling into the prepared pie shell.
Bake at 350 F for 35 to 45 minutes, or until the filling is set. The filling will be puffed up, but it will flatten as it cools.
If the pie appears to be browning too much, place a pie shield or foil ring over the edge of the pie crust. Remove the pie to a rack to cool completely.
Refrigerate until thoroughly chilled before serving. Store leftovers in the refrigerator.