In a medium saucepan over medium heat combine the butter, onion, garlic and rice. Sautee for about 3-5 minutes. Add corn and 2 cups of water and bring to a boil. Add salt to taste. Decrease the heat to medium-low, cover and cook until rice is almost cooked through about 10 minutes. Turn off the heat and let sit, covered, for 5 minutes to finish cooking. Fluff the rice with a fork, add the basil and stir to combine. Serve immediately.