with regards to the ram insert only 1 stick then see how much windows says you have then insert the other one and do the same , next type memory diagnosis into the search box and let the program run.
Check all your connections are secure , one of my fans stopped working because the cable moved slightly as warm air circulated round the case , its surprising that a plug can look like its inserted properly and just out of line a bit can cause a problem.
Some pc's have an extra screen before desktop and if say it detects something like an unplugged fan you get an extra shutdown icon so you don't have to unplug the pc. Yours might not have an extra screen but that could be why it keeps turning off.
Sort the problem ASAP because I once "pulled the plug out" and it corrupted the registry and the windows recovery did not fix it !
When you did not get a signal to your monitor were the fans on your g card running.