Selecting a dropdown menu in Safari

AppleScript doesn't know about menu items, so you will need to use an application that does, such as System Events. Menus can get confusing since menu items can also have menus (take a look at the scripting dictionary), but your command would look something like:

tell application "Safari"
   open location "http://www.website.com/" -- this command is from Standard Additions
   activate -- bring Safari to the front if it isn't already
end tell
delay 2
tell application "System Events" to click menu item "Export as PDF…" of menu "File" of menu bar item "File" of menu bar 1 of application process "Safari"

Tested under macOS High Sierra, here is how I do it:

set saveToLocation to "~/Documents"
set myURL to "http://www.webiste.com/"

tell application "Safari"
    make new document with properties {URL:myURL}
    activate
end tell

tell application "System Events"
    repeat until exists (buttons of ¬
        UI elements of ¬
        groups of ¬
        toolbar 1 of ¬
        window 1 of ¬
        process "Safari" whose ¬
        name = "Reload this page")
        delay 0.5
    end repeat
    tell application process "Safari"
        click menu item "Export as PDF…" of ¬
            menu "File" of ¬
            menu bar item "File" of ¬
            menu bar 1
        repeat until exists sheet 1 of window 1
            delay 0.05
        end repeat
        keystroke "g" using {shift down, command down}
        repeat until exists sheet 1 of sheet 1 of window 1
            delay 0.05
        end repeat
        set value of ¬
            combo box 1 of ¬
            sheet 1 of ¬
            sheet 1 of ¬
            window 1 to ¬
            saveToLocation
        click button "Go" of sheet 1 of sheet 1 of window 1
        click button "Save" of sheet 1 of window 1
    end tell
end tell

Note: The example AppleScript code is just that and does not contain any additional error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors. Additionally, the use of the delay command may be necessary between events where appropriate, e.g. delay 0.5, with the value of the delay set appropriately.