Lawrence Shankland converted from the spot as Rangers finally broke the deadlock against Aberdeen in the second half.