1. Preheat the oven to 160°C (325°F) Gas Mark 3.
2. Wash the rice. Place the rice into a saucepan with the sugar and coconut milk, bring to the boil and simmer for 5 minutes. Stir in the pineapple pieces.
3. Pour the mixture into 1.2 litre ovenproof dish. Dot with the margarine and sprinkle over the cinnamon.
4. Bake in the centre of the oven for 1 - 1 1/2 hours.