Jack Schaefer's novel Shane is about a mysterious figure who appears in the valley on day, looking like no other cowboy in the area. Though he is friendly enough after a while, Shane does not reveal much information about himself. What the Starretts know about Shane is generally gleaned from their own observations, and that is all the reader gets, too.
The most significant thing we learn about Shane's past is that he was a gunslinger, a hired gun, before he came to the valley. The evidence for that is his clothing, his familiarity with holsters and guns, and his ability to defeat Stark Wilson. There are rumors of a few other shady dealings such as gambling, but there is nothing to substantiate that.
We, along with others in the novel, also make the assumption that Shane was once a horseman involved with cattle roundups because he is a skilled horseman, and he actually expertly rounded up a small herd of cattle which got loose while he is working for the Starretts.
Shane is obviously a loner who is thankful for a family, even for a short time. It is also clear that he wants to ensure that Bob grows up "straight" and is not twisted inside by any of the ugliness around him. That is an indication that perhaps that actually happened to Shane, which might explain why he lived the life he has and made the choices he made.