| Fergie |
First off, determine the monsters "role" by checking here:
http://paizo.com/pathfinderRPG/prd/monsters/monsterRoles.html
Shadow demons are a skill based monster, because they rely on stealth to a large extent.
So, if you were to add rogue levels to a shadow demon, it would be +1 CR for every level added, however cleric is considered less beneficial, so the CR increase by 1/2 for every level until the number of cleric levels equals 7 (the original CR), then it goes to a 1:1 ratio.
A shadow demon with 6 levels of cleric would be a CR 10 creature.
However, this formula is more of a guide then a rule. The shadow demon gets its stealth from the shadow blend ability, and being invisible and incorporeal makes a great platform for spell casting and other class abilities.
My thought would be to bump the CR up another +2 if the creature will be used as sort of a boss monster, but leave it as is, or even bump it down a little if the party is equal or greater in level to the creature.
Step 3: Determine CR
Determining the final CR for a creature with class levels requires careful consideration. While adding a class level to a monster that stacks with its existing abilities and role generally adds 1 to its CR for each level taken, adding classes that do not stack is more complicated.
Table: Monsters with Class Levels gives general guidelines regarding which core classes add directly to a monster's abilities based on its role. Classes that are marked “key” generally add 1 to a creature's CR for each level added. Classes marked with a “—” increase a creature's CR by 1 for every 2 class levels added until the number of levels added are equal to (or exceed) the creature's original CR, at which point they are treated as “key” levels (adding 1 to the creature's CR for each level added). Creatures that fall into multiple roles treat a class as key if either of its roles treat the class as key. Note that levels in NPC classes are never considered key.