Well, first of all, there are no spaces.
Second, the second sentence shouldn't have a comma.
Third, the third sentence should instead be:
Often, owners will shout at their dogs or even punish them. But what is needed instead is training.
I hope this helped! If you have any problem please let me know.