Hi welcome to health care magic forum,
,swollen glands with fever may be due to acute pharyngitis
or acute tonsillitis
As your guess might be correct. Initially they are viral infection and secondarily infected with bacterial pathogens.
Your concern is obvious and right too. Because viral infection are contagious .
In my opinion you can take a broad spectrum antibiotic and try to avoid contact to your child.
If no relief than see an ENT specialist
for futher management.