Shearer bags a hat-trick