When our exuberant oldest son was that young we made up a behavior chart that was on our fridge. Each day we checked with the teacher regarding his behavior. If he had a good day then he got to put a sticker on his chart. We didn't do anything for a bad behavior day. We would just say, "I know you will have a better day tomorrow." And we would ask him what he will do the next day to make it a better day. We also would draw a happy face on the tops of his hands as constant reminders to be happy and respectful. It was our way to help him when we couldn't be there during school hours. We made it a fun little game.
Once he filled up our determined amount with stickers on the chart then we did a fun activity with him..out for a treat and a game together, or rent a favorite movie etc. We usually did a 5 day stretch. You don't want to make it so long and drawn out that they lose interest..or get overwhelmed. I just made up my own chart with bright colors a catchy title.
This really helped. We also talked about the importance of following rules when we are someone else's home, or at a store or at school. Other people have varying rules that we need to adhere to when they are in charge.
We made it a point to talk about the good behavior instead of the bad behavior. We kept it very positive. You can even do a little something special for each day she is respectful in class...read an extra story at night, stay up 10 minutes later to play a short game etc. Make it special time with you or daddy. If she has a tough day at school then you just simply say, "I am sorry we can't do that special activity tonight. I know it is sad when you choose to talk in class and miss out on our fun time. I know you will do better tomorrow." Keep it all very positive...and let her own her behavior.
Just as a side note. We really try not to punish our kids at home for what happens at school. This has worked out very well for us. I can't even think of the last time we had a serious problem. We have 3 very outgoing,talkative and social kids. They have learned to restrain their urge to talk.
Last year I got an email from a teacher saying that our oldest,now 7th grade, was abit chatty. We talked to him, just as we did years ago. We didn't punish him..we didn't get mad. We talked about rules and the need to respect others.
On his own, he sent the teacher an email to apologize. He even listed 3 things he planned to do to help himself do better at keeping his yapper shut. The teacher was so very appreciative and they had an email dialogue back and forth. My son learned so much from that experience. I was so proud of him and we praised him for days for doing that.
Maybe have your daughter write the teacher a nice note.
Good luck and best wishes. She is young...she is learning.