Born in York, Shaftoe moved with his family to Kingston upon Hull when he was eleven, leaving school and becoming an apprentice basket maker.
He joined the Basket Makers' trade union in 1862, and took part in a strike two years later, but lost his job as a result, and moved to Bradford to find work.
There, he played a prominent part in a six-month long strike, and was then elected as the local secretary of the Yorkshire Skep and Basket Makers' Union.
He led two strikes, both successful, resulting in increases in wages and a maximum nine-hour day.
Despite bad feelings, Shaftoe remained involved with the labour movement in Bradford, and also became the first working man in the West Riding of Yorkshire to become a magistrate.