The big thing, of course, would be to survive the Civil War.
Shaw was born in 1837; he wouldn't become eligable for the Presidency until he was thirty-five years old (1872) per Article II, Section 1, Clause 5 of the Constitution.
Atop that, he would have had to gain considerable support in the Republical party. As he was an abolitionist, he would win the support of the so-called "Radical" wing of the GOP at the time, but he would also need mainstream support. Thus, he would have had to do more than just command one regiment of African-American troops at the Second Battle of Fort Wagner.
If such happened, I personally wouldn't see him elected until at least the 1876 elections.