There are 3 ways to gain EVs first off is EV Medicine each medicine will put 10 into a stat and you can only use 10 of 1 kind into a stat those medicines are Proteins for Atk, Iron for Def, Calcium for Sp Atk, Zinc for Sp Def, Carbos for Speed, and Hp up for you guessed it Hp. So you can skip 200 evs by giving your Gengar 10 Calcium and 10 Carbos when its level 1. Secondly there is the PokePeligo, if you have developed the work out island you can leave up to 18 pokemon there to EV train over time and the stat that will be raised will be which ever drink you let them have while they play put them in for 38 sessions after loading them up with the medicines and then you take it out and re put it in to do its second stat and then a final time for 1 session for that 4 into its last stat. Finally for a more hands on approach you can go defeat Pokemon to gain EV's. All Pokemon when fainted give off different EV's and any Pokemon that gains Experience from the battle gains EVs that Pokemon gives off so yes the XP Share will help in the EV training process. For instance Pikipeck gives off 1 attack EV when defeated. So kill 252 of them if you don't feel like using the medicine and bingo bango you have a Pokemon EV training in attack. In SOS battles the EV's givin off the newly spawned pokemon will increase which each one you defeat. Also the said Power Items I mentioned in the IV breeding part of my walk through will give you 4 EVs each time you gain EVs in to the stat it says it helps raise so if you defeat a Pikipeck while holding the Power Bracer you will effectively gain 5 Attack EVs