The best way to cook rice with aluminum foil is to first rinse and drain the rice. Then, place the rice in a large square of aluminum foil, add a small amount of water (usually a 1:1.5 rice to water ratio), and season with salt if desired. Fold the foil to create a sealed pouch, ensuring there are no leaks. Place the pouch on a baking sheet and bake in a preheated oven at 375掳F (190掳C) for about 20-30 minutes, or until the rice is cooked and the water is absorbed. This method steams the rice, retaining its nutrients and flavor.