Arduino Wi-Fi shield occasionally not detected

Any suggestions?

Check all the pins carefully. Sounds like one of them is not making good contact. While I often had trouble connecting to my home network, I never had any trouble having the shield detected.