Line your square pan with parchment paper, leaving some overhang for easy removal.
In a microwave-safe bowl, melt the dark chocolate in 30-second bursts, stirring between each, until the chocolate is smooth and glossy.
In a dry skillet over medium heat, toast the shredded coconut flakes, stirring constantly until they turn golden and fragrant—this should take about 3-4 minutes.
Pour the melted butter into the warm, glossy chocolate and stir until fully combined, creating a smooth mixture.
Add the sweetened condensed milk and vanilla extract to the chocolate mixture, stirring until everything is well incorporated and the mixture is thick and shiny.
Gently fold the toasted coconut flakes into the chocolate mixture, ensuring they are evenly coated and distributed.
Transfer the mixture to your prepared pan, using a spatula to press it down evenly and smooth out the surface.
Refrigerate the pan uncovered for at least 2 hours, or until the mixture is firm and set.
Once firm, lift the set mixture out of the pan using the parchment overhang and cut into bars or squares.
Serve immediately, or store in an airtight container in the fridge for up to a week for best freshness and texture.