Sudden shutdowns while running are normally caused by heat or a failing power supply, though there are other lesser possibilities. If your PC needs to cool down before it boots again, that's another indicator of a heat problem.
You can check for a heat problem by downloading a program called Realtemp, and watching it while runing. If your core temps rise above 75C before shutdown, then heat is the likely cause. Solutions include blowing the dust out of your PC to make sure hot air can get blown or pushed out. You also may need to "reseat" your heatsink.
For now de-dust your PC, download RealTemp, and see if you can check temps.
If its not heat, the next most likely problem is your power supply unit. Given the price of your PC, not a lot of money was put into this unit, so failure soon after the warranty period would not be unusual.
But let's check the heat first.