Fry onion and garlic in olive oil and butter until soft. Add peeled tomato (cut in small pieces) and simmer for 15 minutes. Add rice and fry for a couple of minutes. Add water or (better) chicken or beef stock. Season with salt and black pepper. Cook until the rice is done.
Portuguese tomato rice and pastéis de bacalhau: