Extra Domains, in part, says
Several of the prestige classes described in this chapter allow a member of that class to select an additional domain, which gives an additional granted power and offers more spells for the character to choose as domain spells.…
If a noncleric enters a prestige class that allows access to a domain, the character still gains access to the domain. She can use the granted power bestowed by the domain normally. If she memorizes [i.e. prepares] spells… then she can simply choose to memorize one of that domain’s spells instead of one of her usual spells, but never more than one domain spell of each level. If the noncleric is a spontaneous caster [i.e. able to cast spells without preparation] like a sorcerer or favored soul [or shugenja], then she may select a domain spell to add to her spells known whenever she would have an option to choose a new known spell.… (Complete Divine 20)
Here's the scenario: A level 10 shugenja (CD 10–14) at character level 11 the enters the prestige class contemplative (CD 30–3) that at level 1 grants the class feature bonus domain. The character picks the domain Wrath (Spell Compendium 282). Because the shugenja casts spells without preparation, the shugenja 10/contemplative 1 opts to learn the 5th-level Wrath domain spell righteous might [evoc] (Player's Handbook 273) as a nonelement shugenja spell. Then at character level 12 the shugenja 10/contemplative 1 takes a level of cleric.
What happens with regard to the bonus domain that this cleric 1/shugenja 10/contemplative 1 now possesses? Can the character prepare the bonus domain spells in his cleric domain slots and pick spells from the bonus domain as shujenga spells when he's able? Does what happen change if the character first takes the level of cleric then ten levels of shugenja then gains the bonus domain for the level of contemplative?
It'd be great if answers also addressed in this same context another prestige class that grants bonus domains, the prestige class sovereign speaker (Faiths of Eberron 32–5).
Note: While this may seem an unlikely scenario, the campaign's binds allow PCs to take without restriction levels in shugenja but restrict PCs from full advancement in the traditional Player's Handbook cleric.