The coloured slots are there so that you can identify the position for the RAM.
If you are using just 2 modules they must be put in the correct slots - in your case the green ones.
You have the provision for 2 matched pairs.
If your machine is shutting down after 5 mins it could be heat related.
If you can download Speccy from here. ( the free version )
http://www.piriform.com/speccy/download
If you can run it and post the temperatures this will give us the relevant information.