A PIR is effectively a motion activated relay/switch so what you need to do is figure out which of the two pins are the closed contacts, short them and you're off to the races.
But... that's not something you want to find out by trial and error...
Is the PIR working, and do you have a multimeter? If so, then find out which two pins are the DC voltage and which two are the relay / switch output.
Alternatively, is there a part number on either the PIR or on the circuit board?
Actually.... a better couple of photos of the top and underneath of the PCB might do it, as it looks like there are decent component markings on the board.
The rectangular box looks like a LED driver. The blue and brown wires just need wiring straight to the power. As a test, before you blow anything up, just connect a meter from the blue neutral to the red wire and activate the light. It should read 230v if my assumption is correct.
Before chopping it up how long have you had it? We had one of those and it failed within the first year and Screwfix replaced no questions asked. I think the unit has a three year manufacturer warranty. Might be worth contacting the manufacturer to see if you can get something sorted.
I've seen a couple of the budget LED floodlights die whilst still well within their warranty period. I pulled one apart as it was hardly worth the fuel to go back and argue - if you refer to the one above, the LED module is held in with a couple of screws. Heat transfer paste is used on the back of the module to help dissipate the heat from the LED chips into the alloy case. The paste on the faulty ones was some sort of grey treacle, so on a new, unused one I wiped the grey gunk off and replaced it with the more traditional white Dow Corning compound and so far - touching plenty of wood - it is still working fine.