If i connect the positive and the negative terminal of the battery with a wire, the wire will turn red and generate heat.This creates a short circuit.This can damage or explode the battery?Is there any safe way to do it?
Yes, it can damage or explode the battery.
The only safe way to do this is to select a wire such that its resistance is high enough to limit the battery current to a safe level. To begin, you need to read the battery's datasheet to determine what that safe current level might be.
Knowing the battery's voltage and safe current level, use Ohm's law to calculate the necessary wire resistance. The wire must be thick enough to safely carry the current and long enough to have the desired resistance.