If it's just a rectangle, you should be using setShape(). setShape2() is useful for shapes that are not just simple rectangles, and can also be used to change tile types in an easy manner.
PHP Code:
setShape(1, 64, 48);
// rectangle with width = 64 pixels = 4 tiles and height = 48 pixels = 3 tiles; first argument should always be 1
setShape2(3, 2,
{ 3, 3, 3,
3, 3, 3 });
// rectangle, three by two tiles (first two arguments are width and height); the third argument is an array containing
// the tiletypes of the shape in order, starting at the top left, going row by row; here you can use 0 to basically "ignore"
// a tile, because that's the non-blocking tiletype (see http://wiki.graal.net/index.php/Tiletype)