Combine tomato sauce, sugar, soy sauce, vinegar, cornflour, pineapple and retained juice in a small bowl. Set aside.
Meanwhile, heat a wok over high heat. Add half the oil and heat for 30 seconds. Stir-fry chicken, chilli, garlic and ginger for 5 minutes or until chicken is browned and almost cooked through. Transfer to a bowl.
Heat remaining oil in wok over high heat. Stir-fry onion and capsicum for 5 minutes or until softened.
Return chicken mixture to wok with sauce mixture and sugar snap peas. Stir-fry for 2–3 minutes or until chicken is cooked through and vegetables are tender. Serve chicken with rice and shallots.