I would say something to your friend, but be careful how you say it. I would explain that Kayli needs more guidance and instruction in how she is supposed to act. To get Kayli to not be "bad", she needs to be told that what she is doing is wrong, otherwise she won't know the difference. When Kayli misbehaves, there is no reason to yell at her. Just calmly tell her that she does not need to scream, run around, pull things in the store, scratch people, etc. Explain that that is not how we act in a store, that scratching hurts, etc.
My mom had to babysit an almost 4 year old girl the other day. This girl would get upset & yell & curse! My mom would calmly tell her that she did not need to scream, that she was right there & she couldn't understand what she was saying when she screamed. If she wanted something, she just needed to ask. The little girl I think was surprised of my mom's reaction, and she calmed down.
Also, tell your friend that she must be consistent. Maybe you could offer that next time you two and your kids are together & Kayli misbehaves, you could say something to Kayli & show your friend what should be done in the situation. Your friend may not know what to do.
Good luck!