The pilot reported that he was ridge soaring, when he encountered a wind gust, and the glider drifted over the crest of a ridge. He tried to return to the windward side of the ridge; however, he encountered a wind shear, the glider stalled, and then it entered a spin. The pilot recovered from the spin at a low altitude and flew into an area of scrub oaks in a nose down attitude. The pilot reported: 'Flying faster could have avoided the stall....'