400mhz doesn't meen there is 400 mhz of ram built in it just means the spead. Yes it would work.
well it can mean that the video card's on-board memory runs at 400mhz.
anyways, the memory on the video card has nothing to do with your RAM. just make sure the video card you're getting is compatible with your mobo slot (AGP, PCI-express)
shared memory is when you don't actually have a video card, its integrated in the motherboard. it takes memory from your ram and processing power from you processor. so if its 32mb shared, then its taking 32mb of your ram and allocating it to video, if its 64, then its taking 64mb from your ram and allocating it to video. video cards have their own memory.