Preheat oven to 190 C / Gas 5. Grease a 20x30cm baking tin. In a heavy saucepan, combine the butter and chocolate. Cook over low heat, stirring constantly until smooth and well blended. Remove from heat and set aside.
In a large bowl, beat eggs, sugar and vanilla until thick and pale. Stir in the chocolate mixture and coffee liqueur. Fold in the flour. Stir in chopped walnuts if desired. Spread evenly into the prepared tin.
Bake for 30 to 35 minutes or until a skewer inserted in the centre comes out almost clean. Be careful not to overbake. Cool for at least 30 minutes before cutting into bars and serving.