Preheat the oven to gas 5, 190°C , fan 170°C.
Cook the lentils in the vegetable stock for 15 minutes, until al dente. Drain, reserving the stock.
Heat the oil in a casserole and cook the onion, garlic, celery, carrots and courgettes until softened. Stir in the lentils, paprika and chilli, then add the tomatoes.
If the mixture looks a little dry add 100ml of the reserved vegetable stock. Season, then sprinkle with grated cheese and bake in the oven for 20 minutes or until the cheese is golden. Scatter with the olives and serve.