The verb する has multiple meanings and, in your case, it means 'choose'.
よう is an auxiliary verb which means 'intend to'.
か is a postpositional particle used to make an interrogative sentence.
何方に, どれに, なにに + しようか are common set phrases = who, which, what + to choose.
と is a postpositional particle used to quote the former part.
しようかと is often followed by verbs represent 'think' or 'wonder'
何方にしようかと迷っている。= I'm wondering who to choose.
今日の夕ご飯は何にしようかと考えている。= I'm wondering what to have for today's dinner.
車にしようか、電車にしようかと迷っている。＝ I'm wondering which to choose, by car or train.
彼に今日の夕ご飯は何にしようかと聞いてみる= I'm asking him what we choose to have for today's dinner.
In this case, "しようかと " is an abbreviation "しようかなぁ？と", I suppose.
So that must mean "being deciding"
Here is some examples:
夜ごはんを何にしようかと（しようかなぁ？と）迷っている。 I'm deciding what I'm having for dinner.
お花、お菓子、置きものの中から、プレゼントをどれにしようかと（しようかなぁ？と）考えている。 I'm deciding which one is good for the present, a bunch of flower, a lolly, or an ornament.