Deanna Leigh gave you spot on advice.
I agree with this and do this with my own kids as well. My kids are now very articulate kids, they KNOW themselves, they KNOW their feelings and can express it accurately.
This kind of 'teaching' takes time and evolves. But it sets a good solid foundation for their communication/expectations/abilities/coping skills later... when it is more age appropriate.
Your girl is not "defiant." She is only 17 months old... at this age they don't have ANY impulse control, and impulse control is developed... over time. All a baby knows at this age is rudimentary forms of communication... and "yelling" is one of them. Remember, their understanding and communication at this age is RUDIMENTARY still. Although the Parent wishes they'd act like an 'older' child already. But it won't happen.... until they are developmentally and emotionally more mature.
Keep in mind, that what a baby/toddler has in their minds... is not necessarily what they "can" do, literally. So, for kids this age, there is that conflict of 'understanding' versus "ability" to do things. But it is basic cognitive development and normal.
Yes, this "phase" will pass.
OVER TIME, the skills/coping skills that a parent teaches a child, will become an "ability" that a child will later be able to do. Literally. Not just yet, at this early of an age.
Teaching a baby/child, what feelings are, the names for it, is very beneficial. I even taught my kids, that even Grown-Ups get this way... but we "learn" to cope and how to help each other, and be a "team." I even taught my kids that even Mommy is not "perfect" (which is a real eye opener for a child),and that Mommy tries "her best" TOO.
I also know, that even MY voice/actions can piss off a child. WHOA, there's a thought! AND, my daughter is totally able to succinctly tell me things such as "Mommy, I'm upset because you didn't listen to me when I called you....." or, "Mommy, it made me angry that you didn't look at the picture I just drew because you're so busy...." WHOA! Yes, I DO "allow" my kids to tell me things too... and TOGETHER, we work on it and LEARN together. THIS I found, made a BIG difference in how my kids deflate when they are upset. Instead of talking 'at' them, or making something a 'right and wrong' situation, or making something a 'do it or else' situation.... I approach it as a TEAM effort... and how "happy' it makes Mommy when they simply try their best. At no time, do I expect "perfection" from them (since I know each child has different abilities or understanding), so merely trying their best, is great!
For instance, my son is a toddler, he is almost 3 years old... but when he's upset and "yells/screams", I go up to him, I tell him "I know you are upset, can you explain to Mommy why?" Or, I tell him "You can say what you want and I will listen, but can you say it softer?" And then he will say the same thing but in a lower tone of voice. Then HURRAY, I am so proud of him! And he learns this way. But with my Daughter, all I have to do is give her a certain look/facial expression, and she knows INSTANTLY to lower her pitch.
So, you do what works for each child.
I don't do time-outs with my kids. I find it futile for their learning. But I do the occasional toy time-out, or just good ol' talking to them, and showing them the reasoning for what I am telling them, then I give them alternate ideas for it. I "allow" my kids to vent.... I know kids get real pent up, and have so much energy and ideas in their heads... so they NEED an outlet. So, in the midst of a storm... sometimes I just tell them "you can yell, but go in your room to do it...." and its fine. They learn coping skills about it. THEN, we talk about it or I praise them when they 'act-out' but in a positive way.
Sometimes, I just point blank tell my kids "you can't get what you want by yelling. It does not work with Mommy. No. When you think about it, and can ask in another way, then let me know..." And, I actually SEE them "thinking" and stopping... then pausing, then they will actually ASK me in another more palatable way.
BUT, it takes practice and repetition.
Both my kids are spirited, expressive, have trumpet voices, and are very lively... but these things work with them. AND, its a 2-way street though... I also let them tell me what is good/bad if they want to... a child needs to learn how to express themselves and know that they won't get "scolded" for every little thought or action, even if it is not pleasant. This way, they learn how to 'gauge' themselves and others.
If it were my kid, screaming about not wanting to be in the grocery cart, then I would whisper, explain that being in the cart is only for a little while and if he/she can try her best to "help" Mommy and sit nicely....then I will let him/her out and we can go for a walk together later. For my younger son, this works. I tell him my expectation, then offer an outcome or an "incentive" and my son really responds to this kind of rationale. Then I follow through. Or, if he really does not want to be in the cart, then I let him out if he can ask me nicely (instead of yelling) and he does so.... but with the "rule" that he has to follow me closely. And he does.
All the best, sorry for rambling, just some ideas and what I do with my kids that works,
Susan