Preheat oven to 180°C. Grease and line base of a deep 20cm square cake pan.
Place chocolate and butter in a large heatproof bowl. Place over a pan of gently simmering water on low heat. Stir until chocolate melts and mixture is smooth. Remove from heat. Stir in egg, sugar and vanilla extract. Fold in flour and walnuts.
Spoon mixture into prepared pan. Bake for 20-25 minutes, until sides shrink slightly from pan. Cool in pan before cutting into squares.