Faceting Induced by Ultrathin Metal Films: A First Principles Study