When butter melts, add onions or shallots and sauté for about 3 minutes or until softened. Add rice and sauté for about another minute.
Drain juice from canned pineapple into a one cup measuring cup. Add pineapple to rice.
Add canned pineapple juice to measuring cup and if necessary top off with water to make 1 cup of liquid.
Add liquid, salt and sugar to pot and stir to combine.
Turn off the sauté function, lock the lid in place and set the valve to sealing.
Set the pressure to high and the time for 3 minutes.
When the timer beeps, let the pressure release naturally for 10 minutes, then turn the valve to venting. When all of the pressure has release, open the lid and stir.
You can stir in the cilantro at this time or just use it as a garnish.
Notes
Onions or shallots will both work. In place of the cilantro, try mint!