The extra pins on that shield are only accessible over I2C. So you won't be able to use pinMode or digitalWrite.
Wire.beginTransmission(mcp_address);
Wire.write((byte)IODIRA); // IODIRA register
Wire.write((byte)0x03); // set GPIOA-0/GPIOA-1 to inputs
Wire.endTransmission();
That changes the directions of the A pins. 0x03 represents a bitfield of all the pins, where a bit of 1 means that pin will be input, and a bit of 0 will be output.
Wire.write(GPIOA); // address bank A
Wire.write((byte)0x04); // value to send GPIOA-2 HIGH
Wire.endTransmission();
That sets the output states for all the A pins. Again, just a bitfield, so you're setting the output state (HIGH or LOW) for all the pins at once.