That's called "plugging" a tire. It isn't even considered the right way to fix a hole in the main part of the tread, but it is done all the time, and seems to usually work fine.
I don't know why, maybe because the sidewall flexs more, but tire places never want to repair any hole in a sidewall. I don't see why you couldn't use it as a spare, though. You might fix it, ride around on it in town a day or two, just to make sure it will hold air, without getting up to highway speed, then switch it to the spare position.
Thanks guys. I had an old Land Cruiser/Rock Crawler long ago and plugged its tires all the time. I put a lot of miles on those tires and probably was lucky.
I found out I had road hazard coverage on the tire (less than 2 mos. old and a $280 tire), so I replaced it for cheap.
I don't think the tire places would hot patch a sidewall hole, may be mistaken. Of course, it is better to replace the tire, but a lot of cars come with a spare you can't drive at regular speeds on, and it you consider this a spare in that manner, just to get you to a tire store if you have a flat, it probably would serve that purpose.
FWIW, I worked at NTB many years ago, and we weren't allowed to repair any sidewall punctures because of the risk. Granted, I quit working there after two months so I am not a tire expert, but IIRC the policy was in place due to prevent adding stress near a tire's sidewall belt. Who knows, maybe they were just trying to get people to buy more tires.