A shanty is a small, simple house, especially one that is not built well.
Shanties are often seen as poor or not very nice places to live.
Examples:
The old man lives in a shanty by the river.
The shanty is falling apart.
She built a shanty in the woods.
I wouldn't want to live in a shanty!
In the story, the pirates lived in a shanty by the sea.
The shanty was so small, it was like a toy house.