The three-year old male was freed from the 75 centimetre (30 inch) crawl space on Burung Island in Riau province at about 1:50 am, the local conservation agency said.
"After the tiger was successfully put to sleep we opened up part of the shop's foundation to do the evacuation," Suharyono, head of the Riau conservation agency, told AFP.
The 80-kilo (180-pound) animal was treated by veterinarians for minor wounds on its legs and cracked canines, officials said.
The big cat became stuck between two buildings in the densely populated market area on Wednesday before freeing himself and then becoming trapped again beneath the building.
Video footage showed the tiger lying on its belly between two concrete foundations, unable to move.
The tiger has been transported to a rehabilitation center.
Sumatran tigers are considered critically endangered by the International Union for Conservation of Nature.
There are fewer than 400 Sumatran tigers left in the wild and environmental activists say they are increasingly coming into conflict with people as their natural habitat is rapidly deforested.