Stir together sugar, cornstarch, and salt in saucepan. Combine egg yolks with milk and gradually add to sugar mixture. Cook over medium heat until mixture comes to a boil. Remove from heat and stir in butter and vanilla. Add melted chocolate and pour into pie crust. Cool.