jean, you practice with your child every single day until the child learns that he/she must obey you everywhere,& at all times.
At home or out in public. You have to be consistent with your child and don't threaten something you will not be able to do. Keep your temper in check and speak calmly and back up your words with action. Earn your child's respect by behaving as an adult at home and in public and he/she should learn in time(and if you start early in his/her life) to mind you when in public as well as at home.