For the marinated tofu, combine all the marinade ingredients, except the vegetable oil, in a bowl and mix well. Add the tofu, coat in the mixture and allow to marinate for 5-10 minutes, or longer if possible.
Heat a wok over a medium heat. Remove the tofu from the marinade, setting the marinade aside. Fry the tofu for 5-10 minutes until golden-brown all over. Strain the marinade to remove any small pieces of tofu.
For the rice, heat the oil in a pan and fry the onions and garlic for 2-3 minutes until softened, then add the pepper and fry until the tofu for 2 minutes. Add the spinach, rice and reserved marinade and heat through for a further 3-4 minutes.
Serve the rice with the marinated tofu on top.