A soap shaker is a wire metal mesh box with a handle.
Held by its handle the box may be vigorously shaken in a water filled bucket or other container.
The result is that the water will become soapy, rich with suds to be used for cleaning purposes.
This way even small pieces of bar soap could be re-used and are not wasted.
The use of a soap shaker was common early to mid 20th century.