I don't think we can know whether a shock or a spray collar is more unpleasant for a dog. I've heard various people say that the spray isn't unpleasant to the dog, it just distracts the dog enough to interrupt the barking. Balderdash! If all that was happening was that the spray was a distractor, then water would work just as well. To the extent that the spray collars work at all, they work because the smell of the spray is unpleasant. Humans generally find a shock to hurt more than a spray of citronella, but dogs' sense of smell is something like 10,000 to a million times more sensitive than ours is. So, I wouldn't feel terribly confident in assuming that a shock feels worse to a dog than an intense smell in the face. What we do know is that a spray collar is the gift that keeps on giving long after the barking has stopped. It seems to me that these spray collars violate a basic principle of training - that whatever correction one may give should go away immediately when the unwanted behavior stops.
I've never used either collar myself, but I know a couple people who soon discarded their spray collars. They said the collar worked great at first, but soon became ineffective. My guess is that initially the dog associated the spray with barking, but after a while the odor was always present, whether the dog was barking or not, so the spray no longer was an effective deterrent. Plus, as a couple other posters have pointed out, some dogs learn to empty the cartridge, and then bark away to their heart's content.
The few people I know who have used electronic collars say the dog learns very quickly how to avoid the shock, and that they are very effective as long as the dog is wearing the collar. A couple people I know feel that they only need to put the collar on the dog periodically as a "reminder" not to bark. Some find that after only a couple experiences with the collar, they could remove the batteries, and the dog would curb his barking as long as the collar was on. Some found that the dog would "test" the collar as if checking to see if it was live, and so would have to wear the collar more or less continuously, and with charged batteries at all times. I've also heard indirectly of dogs that have developed sores on their necks from having to wear the collars for extended periods, and I've also heard indirectly of some dogs being so seriously freaked out by their first experience with the shock that they became panicky and barked worse, which caused more shocks which caused more panic.... not good. Then again, I've never met anyone in person who had this experience, so I don't know how common this is, or if it's an urban legend.
If I were in a position where I felt I must resort to a remote collar, I would spend the big bucks to get a good quality electronic collar with an adjustable setting, and I would absolutely make sure I checked my dog's neck daily for any sign of soreness. I would not waste my money on a spray collar.