In a bowl, break cold cooked rice with hands to separate grains.
Heat wok or wide pan over high heat. When the pan is hot, add oil and swirl around the bottom of the pan. Heat until shimmering.
Add onions and garlic and cook until softened.
Add chicken and cook, stirring regularly, until lightly browned and cooked through.
Add shrimp paste and chili paste, stirring regularly.
Add rice and cook, spreading the rice on the entire cooking surface of the pan, for about 45 seconds or until grains start to sizzle and then toss to redistribute. Repeat a few times until rice is heated through.
Add kecap manis and toss rice gently until fully coated with sauce and evenly colored.
Season with salt to taste.
Transfer to serving plate and top with fried egg, fried shallots, and sliced cucumbers and tomatoes. Serve hot.