You can do Rogue 3 / Wizard 5 / Loremaster 1.
Loremaster has Decipher Script as a class skill.
Note that this method is rather intense in use of skill points and feats.
10 ranks in 2 knowledge skills. Make sure one of those is Knowledge: Arcana. Since these aren't exclusive skills, just make sure your 7th level is in wizard and buy them up the remaining bit.
3 metamagic or creation feats + skill focus in a knowledge skill. Scribe Scroll is a creation feat, so that makes it slightly easier.
Decipher Script: 7 ranks. Get 6 from Rogue and 1 from Loremaster.
Disable Device: 7 ranks. Get all 7 from Rogue. Need to be 4th level to do this.
Escape Artist: 7 ranks. See above.
Knowledge: Arcana: 4 ranks. You should have gotten this as part of qualifying for the loremaster.
Total Wizard class skills required: 20 skill points, must be 7th level character.
Total Rogue class skills required: 20 skill points, must be 4th level character.
Total Loremaster class skills required: 1skill point.
Total feats required: 3, one of which is a general feat.
Lots of different ways to do this. Here is just one example build:
1: Rogue 1, max out Decipher Script, Disable Device, Escape Artist.
Feat: Your choice.
2: Rogue 2, max out same skills. Now you don't loose your Dex bonus when flatfooted.
3: Wizard 1, max out Knowledge: Arcana and Knowledge: Architechure & Engineering.
Feat: Silent Spell
4: Wizard 2, max out same skills.
5: Rogue 3: Get those skills up to the required 7 ranks in Escape Artist, Disable Device. Get your 6th rank (the max you can) in Decipher Script.
6: Wizard 3: Work those knowledge skills some more.
Feat: Skill focus: Knowledge: Architechure and Engineering.
7: Wizard 4: Get those ranks in the knowledge skills
8: Wizard 5: Finally make sure you have the required 10 ranks in Knowledge: Arcana and Knowledge: Architechure and Engineering.
Feat: Still spell
You now qualify for loremaster provided you picked up enough Divination spells.
Feats: Skill focus: Knowledge: Architechure and Engineering; Still Spell; Silent Spell; Scribe Scroll
9: Loremaster 1: Pick up that last skill point in Decipher Script.
You actually get to decide how you are using your feat this time, PrC isn't limiting your options.
You now have 2d6 sneak attack and a caster level of 6.
10 Arcane Trickster 1 Start on your path.
At somepoint, pick up one more level of Wizard so your 20th level character is:
Rogue 3 / Wizard 6/ Loremaster 1/ Arcane Trickster 10. Total caster level of 17, which just barely gets you a 9th level spell.
You would need a minimum of 14 Int to do this, although you would like much higher in order to be able to actually buy some Concentration and Spellcraft skill.
Note: This only gets you the spell one level faster than it would otherwise. If you are going into Epic play, your next level would get you 9th level spells.