Heat the milk in a saucepan until it comes to a boil.
In a separate bowl, whisk the egg yolks and sugar until combined.
Add the crème pâtissière powder (or flour + cornstarch) and mix.
Gradually pour half the hot milk into the egg mixture, whisking constantly.
Return everything to the saucepan and cook over medium heat, whisking continuously until thickened.
Once boiling, add the chocolate and stir until fully melted. Cook for 1 more minute, then blend with an immersion blender.
Transfer to a dish, cover with plastic wrap (touching the surface), and refrigerate until fully chilled.
In the stand mixer, whip the softened butter until light and smooth.
While whipping, gradually add the chilled pastry cream in 3–4 additions.
Beat until light and airy. Transfer to a piping bag fitted with a plain round tip.