A short sale will appear on your credit report for seven years. It is usually reported as a "charge off" or "settled for less than the full balance." Either way it is quite negative, but it may be better than the hassle of going through foreclosure. (It's not "better" than foreclosure, at least credit score wise, however.)
But like anything negative on your credit report, you can start to improve it before the seven years is up. We have a chapter devoted to that topic in Reduce Debt, Reduce Stress. We hope you will find it helpful.