We have found a bar of shocked molecular hydrogen (H2) towards the OH(1720 MHz) maser located at the projected intersection of supernova remnant (SNR) G359.1-0.5 and the nonthermal radio filament known as the Snake. The H2 bar is well aligned with the SNR shell and almost perpendicular to the Snake. The OH(1720 MHz) maser is located inside the sharp western edge of the H2 emission, which is consistent with the scenario in which the SNR drives a shock into a molecular cloud at that location. The spectral line profiles of 12CO, HCO+ and CS towards the maser show broad-line absorption, which is absent in the 13CO spectra and most probably originates from the pre-shock gas. A density gradient is present across the region and is consistent with the passage of the SNR shock, while the H2 filament is located at the boundary between the pre-shock and post-shock regions.