Preheat oven at 350°F/180°C. Grease and flour a 22x22cm/9x9-inch baking tray, or line it with parchment paper.
Melt chocolate and butter together in a Bain-Marie. Beat eggs and sugar until creamy. Add flour and beat for 1-2 more minutes. Add walnuts and then the melted chocolate. Mix to combine.
Pour into the prepared pan and bake for about 20-25 minutes, or until a toothpick inserted in the center comes out almost clean.
Let cool on a wire rack. Drizzle with the caramel sauce and sprinkle with flaky salt if desired.