Nothing is known about the shack before or as the outbreak started. It is unknown is the shack belonged to hermit before the outbreak, or if he moved in for shelter to survive the walker attacks in the area.
When Rick Grimes, Michonne Hawthorne, Oscar, and Daryl Dixon are attacked by a large group of walkers in the red zone, they discover the shack and quickly rush inside. They barricade the door shut and try to formulate a plan of escape. However, they are interrupted when a homeless man (hermit) jumps out of his bed in a panic. The hermit aims his shotgun at the group, while they try and calm him down.
This only makes things worse, when he says he knows of no walkers and starts screaming, sending the walkers outside into a frenzy. He says he is getting the police and heads for the door; however, Michonne stabs him through the chest with her katana. The group then use his body as a distraction and they throw the body outside, which distracts the walkers long enough for the group to make their escape threw the backdoor.