This sort of question has already been asked: http://pokemondb.net/pokebase/50392/ninjask-shedinja-evolve-nincada-empty-party-pokeball-your
Question: Do you get Ninjask AND Shedinja when you evolve Nincada with an empty slot in your party and a Pokeball in your bag?
Answer:Yes you if you have at least one empty spot you will get 1 Shedinja, but you will not get more than 1 Shedinja if you have more than one empty space, you Nincada will be replaced with Ninjask and you empty spot will be replaced with Shedinja. You must have a Pokeball in your bag and it must be a regular Pokeball. You can get Shedinja to learn one of any move that Ninjask can learn by level up depending on when you evolve it. Example: Shedinja can not learn Swords-dance(not even by TM) but Ninjask learns it by level up at lvl 25, so wait until level 25 to evolve your Nincada and your Shedinja will also have Swords-dance. This is because your Shedinja has the same set as the Ninjask.
CREDIT TO SPEED FREAK!