I was wondering if you are talking about an acoustic/electric guitar here, because even then it's a good idea to use the SM57 about 2 1/2 to 3 feet away from the body (the length of the guitar body) in addition to the direct input. Then, you can mix these two signals together for a great sound.
You didn't specify the type of guitar, and I saw an opportunity to up my postcount...