There can be dozens of reasons for random shutdowns while playing hardware demanding games but most common are:
1). Overheating of some component inside of the rig (CPU, graphic card, even PSU)
2). Not enough powerfull PSU
Try this:
1). Open the case as much as you can and then try to play to se if random shutdowns will happen again and if it happen again after more time then probably some component inside rig is overheating. Do you have enough air circulation inside the rig? How many fans are blowing fresh/cold air inside, and how many fans are blowing worm air outside the rig?
2). If #1 solution doesn't help then probably your PSU can't stand a "pressure" from CPU and graphic card because while gaming both of them are drawing much more current from PSU. Try with stronger PSU, minimum 100W stronger then that you're having now.
And for the error with internet connection... Random shutdowns probably messedup some Crysis 2 files on hard-disk, uninstall game, then manualy delete all files/folders left after uninstalation process (in Program Files, Documents and Settings...), then clean Windows Registry base (type: regedit ...in Windows search field) from Crysis 2 keys, install and run CCleaner and do a clean of "garbage" files and cleaning of Windows registry, restart Windows and try to install game again.