What you want to do is create a "dummy battery" that will fit inside the camera in place of the AA batteries and make contact with the battery contacts in that compartment. Here's an example of someone doing something similar: http://www.lumika.org/gear_a2e_batts.htm.
Building the dummy battery for your camera is really just a mechanical issue. The electronics design part could come in if you were trying to supply power with a higher voltage and needed to regulate it down to match the voltage output from the AA batteries (most likely this is 3 V for the two AA batteries in series). This will depend on your camera and the external power source you decide to use.
From the information provided it sounds either like a faulty battery or a very high current drain from the equipment - or both.
Update 1 : Having seen the most impressive photo, my prior assessment stands. This would be extremely unusual. A large amount of energy seems to have been involved. If there were 3 or more batteries in series (were there?) and one was reversed this may happen as the current would be driven through it backwards.
This strongly suggests a bad battery - possibly a counterfeit one.
Update 2:
We now know there are two batteries.
This is less than the 3 minimum needed to drive current backwards through one battery so the back discharge mode seems unlikely.
it is still possible with one well charged battery and one fully discharged.
The good battery can effectively reverse polarity charge the dead battery.
Unlikely but possible in this case.
A counterfeit battery still sounds possible.
Prior material:
IR remote controls pulse IR LEDs with short pulses of very high current - possibly an amp or more. Most batteries should either provide this or just gracefully fail to do so. A very poor quality battery or a faulty one MAY be affected by such a load.
If the IR control stayed on for some reason then a continued high current may occur. If this happens the IR LED would probably die. If your control still works with a nw battery then this is probably NOT what happened.
It is EXTREMELY unusual for an AAA cell to "explode" in use. You need to say if it was an alkaline, or NimH or ??? type cell.
Some appliances allow charging of the battery inside the equipment. If a non rechargeable battery is charged it MAY explode. This would be rare and it is unlikely your remote allowed charging.
Aspects worth considering in situations like this:
These are suggestions only - necessarily an incomplete list.
What sort of battery - Alkaline, NimH, other?
Ability to deliver high current may increase chances of "energetic" reaction.
How many AA batteries in remote?
Three batteries are required in series for reversal of one battery to cause significant reverse current flow when all batteries are in good condition. (ie one "forward" battery opposes the reversed battery and the remaining 'forward' battery supplies forward current.
IR remote presumably?
IR remotes often pulse the LEDs at very high peak current levels - far higher than in most handheld devices.
Brand of battery?
Age of battery (time in use)
Was it recharged
Was a non-rechargable battery charged? Can 'cause problems'.
Best Answer
I chose to go ahead and give it a try.
Result: The battery got hot to the point that I could not keep it in my hand for more than a few seconds, but not so much to melt the case.
Voltage dropped to 0.1 in about ten minutes, and that was the point where the temperature was at its highest.
The wires did not get as warm as I expected, probably because their resistance is negligible compared with the internal battery one.
Unfortunately I did not have a digital thermometer, so all of this test was very rough. A graph comparing temperature raise and voltage drop over time would have been cool. After dropping below 0.1V, voltage kept dropping, while temperature dropped as well - battery got less warm.
So to answer my own question: it was safe, at least in my case.
The author of the book, for what matter alkaline batteries, recommends wearing protective glasses (and I would add, gloves) just in case the battery is defective, so I advise to do the same in case you want to reproduce this.
If you do, and have more accurate measurement instruments (and patience) than I had, it would be interesting to see the behavior pictured (and compared with a test with an alkaline cell.)
By the way, in the minutes I took to write this the battery is still providing current into the short circuit. It is at 45mV right now.