 In 1841, he served in the Vermont House of Representatives and from 1842 to 1849, Shafter was the Secretary of State of Vermont.In 1850, he moved to Sheboygan, Wisconsin and was elected to the Wisconsin State Assembly.In 1852, Shafter served as speaker of the Assembly.