I don't think they shoehorned RiRi into the plot at all.
This is a little bit long... but bear with me...
I had mentioned earlier in this thread that this movie is equal parts a 'character study' + combined with a traditional 'plot-driven narrative'.
Please Allow me to explain further (You might disagree, but here goes..)
- As you know, a plot-driven narrative type of story is when 'events' supersede 'character development' (for example: it's when things like plot twists + fantastic world-building + and plenty of action scenes all help to 'move the story forward'.)
- So in this case, the 'plot-driven narrative' half of the movie..... is all about Namor.
- It includes his origin story.
- The World-building of his underwater kingdom.
- His rise to power + the reveal of his master plans...
- And ultimately the war that ensues between Wakanda and Talocan... in order to stop his plans from unfolding.
- Wakanda's Heros gather together to save the world from Namor's destructive might.
Meanwhile, the other half of the movie is the "character study"..... of key characters like Queen Ramonda + General Okoyé.
But more than anyone else... it's about the "character study" of Shuri.
It's about her evolution.
A character study is when a movie is driven more by the internal struggles of one or more main characters.... rather than being completely driven by the events of the plot.
During the movie... Shuri had these 2 things that she struggled with...
- She struggles with 'dealing with her emotions' of grief. (Which she ultimately replaces with Revenge)
- She struggles with 'finding her purpose' after she loses the people closest to her.
Shuri is driven by 'purpose' to excel at the things she does.
She doesn't excel because she is pushing herself to be better... in order to set a new 'personal record'.
She excels when there is a 'purpose' for her to excel... like an emergency (or crisis) that needs to be averted.
For almost the entire movie, Shuri refuses to grieve over the loss of her brother & later over the loss of her mother.
In order to stay strong... she pretty much closes off that part of her brain that allows herself to release her deepest emotions.
Instead, she relies on her technological mind to provide 'the purpose' for her decision-making.
On the beach, in a final battle with Namor.... in order to become the VERY STRONGEST version of herself... Shuri finally "gives in" to ALL the emotions that she had been bottling up for the entire movie.
And in that very moment... when she needed the support of her family/ancestors the MOST... Queen Ramonda finally arrives to provide the motherly advice to "show them who you REALLY are". (Which means to stop letting Vengeance consume her emotions... and show "the compassionate" side of herself instead... which Shuri was suppressing the whole time. All of her stoicism had made her numb toward life & death)
To me, this mirrors the ultimate sentiment of T'Challa in Captain America: Civil War, when he captures Baron Zemo and he says to him:
"Vengeance has consumed you. It has consumed them. I am done letting it consume me."
THAT is what Shuri needed to hear, in order to triumph on the beach, against Namor.
- She needed to KNOW that her ancestors in the ancestral plane would NEVER abandon her.

- She needed to NOT LET vengeance consume her, the same way it did not consume her brother.
- She needed to KNOW that it was ok to 'be compassionate.
- She needed to heal. And to find a new purpose in life.

So why is RiRi's character soo important in all of this??
- Because RiRi's character plays a HUGE part of Shuri's (overall) healing process.

- Her character provides Shuri with 'a new purpose' in her life.

Did you notice how RiRi's personality in BP2 was very similar to Shuri's personality in BP1?
When we met Shuri in Black Panther 1, she was a young + cocky technological genius. Full of sarcasm + witty banter + sharp quips. Plus she was a bit rebellious. A Prodigy who knows that she is one. But also she was a bit of a "fangirl" of her older brother T'Challa.
So when we meet RiRi in Black Panther 2, she is a miniature version of Shuri.

Full of sarcasm + witty banter + sharp quips. Plus she is a bit rebellious. She's a Prodigy who knows that she is one. But also she is a bit of a "fangirl" of Shuri.
And by the end of Wakanda Forever, in the same way T'Challa was a 'big brother' to Shuri.... Shuri herself becomes a 'big sister' to someone whose personality was IDENTICAL to hers, in the first Black Panther movie.
So RiRi is important.... because she helps to complete the entire 'character arc' for Shuri, in this movie. 
RiRi provides a degree of 'Sisterhood' which fills a HUGE VOID left by all the family Shuri lost... and she also provides a 'new purpose' for Shuri to grow (both emotionally & technologically), in any future Black Panther (or Ironheart) projects.
Shuri went from being "the genius little sister"... to being an "Auntie" + a "Big Sister" + a full-fledged "Super Hero" during this movie.
That was her 'character arc'. 
Without RiRi... a big piece of Shuri's character development (ie "finding her purpose") lacks some much-needed exploration. 
Just my opinion.
Salute.