An easy-to-implement non-optical shear-force detection setup for tip-sample distance regulation in scanning near-field optical microscopy is demonstrated. The detection method is based on attaching the near-field probe to a piezoelectric tube resulting in excellent mechanical contact between tip and detector. The main advantages of the method are good signal-to-background contrast and thus potential for high sensitivity. The method is demonstrated by obtaining approach curves of silicon surfaces. The suitability for optical experiments is further shown by measuring the near-field intensity distribution of the emission of a semiconductor laser.