When i press "shutdown" the computer restarts....

Solution
Are you pushing the restart button - or power and restart may be switched at the mobo. If running Win, use Win to shut the system down, not a power button
You say you "press" shutdown. If you mean "pressing" the power button then you have to hold it for 4 seconds to shut down the computer. Normally this is done in software by "clicking " shutdown on a menu that you have to open first. Of course maybe you have touch screen and then I suppose you would be "pressing" shutdown. A little more information would help. I would check and make sure all the wires to the MB front panel connectors are correct. There are settins in BIOS related to restarting after power failure. You might find something that helps in there. You don;t say if it's an OEM computer and waht PSU you installed. sometimes they play games with the PSU pinouts.
 

PhatLloyd

Honorable
Jul 1, 2014
764
1
11,165
A short in the PSU could prevent it from cutting the power from the source and continuously forces power into the system. Check that the PSU is in working order. Try switching it off at the wall and then on, if the PC stays off the PSU should be fine.