A substitute is a good that is seen as relatively equal to another good in consumption. Rice is a staple grain for many people and viewed as an alternative to past. When the price of rice increases, more people will want to buy spaghetti as it is a cheaper alternative, all else being equal;. which will shift the demand curve to the right.
A complement is a good that is often consumed with another good. Spaghetti and meatballs is a common dish, the two goods are often served together. A decrease in the price of meatballs would likely increase the demand for meatballs and the demand for spaghetti. This will also shift the demand curve to the right.
The supply curve for spaghetti is unaffected as this news does not impact the process of production or the price of its inputs.