Cook the butter and onions over medium heat until translucent, about 3 minutes. Add the rice and toss until all of the grains are coated with the butter. Add the water and salt, cover and cook until the water is absorbed and the rice is tender, about 15 to 20 minutes.