The Mishna Berura (Rav Yisrael Meir Kagan of Radin, 1839-1933), in Siman 242 (Se'if Katan 9), writes that if somebody receives from another person some food for Shabbat, he should not eat that food on a weekday. Since the food was sent specifically in honor of Shabbat, it should be eaten on Shabbat. The Halachic authorities debate the question of whether this ruling was intended as strict Halacha, or as a Middat Hasidut (additional measure of piety). Either way, the Kaf Ha'haim (Rav Yaakob Haim Sofer, Baghdad-Israel, 1870-1939) writes (in Se'if Katan 18, citing the Sefer Hasidim) that if one has no need for this food, such as if he already has enough food for Shabbat, and if he leaves it until the next Shabbat it would go spoiled, or if he is not accustomed to eating this kind of food on Shabbat, then he may eat it on a weekday. Certainly, it is permissible to taste the food on Friday in fulfillment of the Misva of "To'ameha Haim Zachu" (tasting food on Ereb Shabbat to ensure its quality). The work Piskeh Teshubot notes that this Halacha mentioned by the Mishna Berura applies only to food that one received from somebody else. If this food was earmarked for Shabbat, then it should not be eaten on a weekday. If, however, a person himself purchased food for Shabbat, he may change his mind and use it during the week. Proof may be drawn from the Gemara's famous description of Shammai, who would sometimes find a higher quality portion of food after making his purchases for Shabbat, and in such cases he would use the first portion during the week and designate the second, higher quality portion for Shabbat. This proves that one who purchased a piece of food for Shabbat may change his mind and use it during the week. And although in the case of Shammai he changed his mind only after finding a higher quality piece of food, it stands to reason that this applies even generally, and thus one who purchased some food for Shabbat is allowed to change his mind and eat it on a weekday. Summary: One who purchased a food for Shabbat may change his mind and eat it on a weekday. However, if somebody was sent food from another person specifically for Shabbat, he should not eat it on a weekday unless he does not need it for Shabbat and it would go spoiled if it is saved until the next Shabbat.