Hi,
The shutting down could be any number of things. Get your Volvo dealer to hook the car up to their computer to check for a fault code.
It could be a sensor, or the fuel pump, or the ETM. or ??
The fuel pump can give intermittent problems like you have described. It's fault would not be recognised by the car's computer.
The ETM - Electronic Throttle Management fly by wire control could an issue - and is the most sinister of all Volvo problems. There is a class action suit against Volvo going on in the States. A warning light on your instrument cluster would usually appear.
See ETM issue here:
http://vexedvolvo.org/
Let's hope it's a simple issue for you.
Cheers ....... Nick
Canberra Australia