How do you fix a door lock if the door is shut and you can't open it to take off the panel?

Hi - I had the same problem (on a Peugeot 205). Take off window winder (screwdriver to prise off) and same for surround around door handle. Take out 2 screws holding armrest. Peel back the door trim from the top. This gives sufficient acces to (just) get your hand to the locking mechanism. Difficult to tell you how to open the door from here as it depends on the problem. However, various jiggling of the parts will probably enable you to free the lock and open it - as I did with mine.