pathItems has a basic shape constructors to match those found in the GUI.
#target illustrator
var docRef = app.activeDocument;
with (docRef) {
pathItems.polygon(width/2, height/2, 100, 3, false); // A triangle
pathItems.rectangle(height, 0, width, height, false); // A rectangle
}