Resurrecting an old thread here, but my car had this exact same fault and I found out how to cure it the other day, so I thought I'd post the solution up in case anyone else is searching for it.
The problem is basically that the boot release switch is a really flimsy design, so if it gets even slightly out of place, it can wobble about, allowing contact to be made, and so the boot solenoid is triggered. Mine did it when I closed the door, when I opened the door, when I even just looked at the damn car...
1) Turn the sidelights on - this both illuminates the glovebox so that you can see what you're doing, and stops the solenoid from going crazy while you're working on the switch.
2) Open glovebox and carefully prise the cover off the light inside it.
3) You should now be able to see the switch mechanism - push the switch and a plunger goes upwards.
4) Push this mechanism firmly towards the centre console and you should hear a quiet click as it goes back into place. If not, try removing the whole thing (pull it towards you slightly, push downwards, and it just drops out) and then reseating it.
5) Remove the key from the ignition and test by slamming the door, opening/closing the glovebox, whatever caused the boot to pop before. Nothing should do it now apart from a firm press of the switch.
6) Refit the light cover and the job's a good 'un. No tools required, cost = £0.00. The best type of fix