Tables of contents that have more than one level are formatted with TOC n styles (where 'n') is the level. Thus if you create a table of contents that includes only Level 1 and Level 2 then Level 1 will be style TOC 1.
{ TOC \f \h \z \t "Heading 1,1,Heading 2,2" }
If you include a Title style
{ TOC \f \h \z \t "Title,1,Heading 1,2,Heading 2,3" }
Then Heading 1 will be level 2 and the style TOC 2
You can modify the Style in question > Format > Border > Shading to include the shading you require.