If you haven't already, bake your pie shell according to the instructions provided. Allow it to cool completely before adding the filling.
In a mixing bowl, whisk together the sugar, flour, and salt until well combined.
In a saucepan over medium heat, heat the milk until it’s just about to simmer. Keep an eye on it to prevent scorching.
Add the unsweetened chocolate squares to the warm milk, stirring continuously until the chocolate is completely melted and incorporated.
In a separate bowl, whisk the beaten egg yolks. Gradually add a small amount of the hot milk mixture to the egg yolks, stirring constantly to temper them.
Pour the egg yolk mixture back into the saucepan with the remaining milk and chocolate mixture. Cook over medium heat, stirring constantly until the mixture thickens and bubbles. This should take about 5-7 minutes.
Once thickened, remove the saucepan from the heat. Stir in the butter and vanilla extract until fully melted and combined.
In a separate bowl, beat the cream cheese until smooth. Gradually add the chocolate mixture to the cream cheese, stirring until the filling is luxurious and creamy.
Pour the chocolate filling into the cooled pie shell, smoothing the top with a spatula.
Cover the pie with plastic wrap and refrigerate for at least 4 hours, or until set.
Once set, slice your Homemade Chocolate Cream Pie, serve it chilled, and enjoy the delightful flavors with your friends and family!