What you are experiencing is the difference in level between different devices. Low impedance microphones, like the SM58 have a very low output level. A guitar, on the other hand, has a much hotter output. The sound card on your computer requires a hotter level.
To connect a professional microphone to a computer, you will need to bypass the computer sound card and use a USB interface, such as the Shure MVX2U USB Adapter. This is a high quality microphone preamp with a USB computer interface. It is an outboard audio interface. That is, you would no longer use the sound card that came in your computer. It does supply phantom power for condenser microphones. You can also purchase a microphone, such as the Shure MV5 or MV51, that have built-in USB ports.