"My battery was to low to open the doors but it had just a little bit left for the alarm. the solution for me was:
First the thing you need:
- a second car or battery
- starting cable (booster cable)
- an extra hand
Place the minus on the engine (crawl under the car). On the driver side is the alternator, take the rubber seeling of and place the plus on it. (same can be done with the starter)
Let the second person open the door"
I took that from bmwe34.net.