The purpose of disciplining your children, including physical punishment, is not to inflict needless pain but to instruct, i.e., discourage foolish behavior and encourage godly behavior. Sometimes that discipline will be a spanking, other times it will be something else. But the goal is always to instruct the child in God’s wisdom. Therefore, your discipline must never turn into child abuse. God never condones this.