Heat 1 tablespoon of vegetable oil in a large skillet or wok over medium-high heat. Add the shrimp and season with salt and pepper. Cook for about 2-3 minutes on each side until the shrimp are pink and opaque. Remove from the skillet and set aside.
In the same skillet, add the remaining tablespoon of oil. Add the diced onion and red bell pepper, cooking for about 3-4 minutes until softened. Stir in the minced garlic and cook for an additional 30 seconds until fragrant.
Add the cooked jasmine rice to the skillet, breaking up any clumps. Stir in the diced pineapple and soy sauce, mixing well to combine. Cook for about 5 minutes, allowing the rice to heat through and the flavors to meld.
Return the cooked shrimp to the skillet and add the sambal oelek. Stir everything together and cook for another 2 minutes. Taste and adjust seasoning if necessary.
Remove from heat and stir in the toasted cashews and sliced green onions. Serve immediately.