Break the chocolate into pieces. Line a 20cm (8in) square cake tin with baking parchment.
Place the condensed milk into a saucepan and add the butter and chocolate. Heat gently over a low heat, stirring constantly until the chocolate and butter has melted and the mixture is smooth.
Remove from the heat, beat in the vanilla extract if using, then beat for a few minutes until thickened.
Pour into the prepared tin and level the top. Chill in the refrigerator until firm.